Refresh rework
This commit is contained in:
@@ -146,13 +146,16 @@ Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Mus
|
||||
frameB = false;
|
||||
|
||||
musicService.event(Controllers::MusicService::EVENT_MUSIC_OPEN);
|
||||
|
||||
taskRefresh = lv_task_create(RefreshTaskCallback, 5000, LV_TASK_PRIO_MID, this);
|
||||
}
|
||||
|
||||
Music::~Music() {
|
||||
lv_task_del(taskRefresh);
|
||||
lv_obj_clean(lv_scr_act());
|
||||
}
|
||||
|
||||
bool Music::Refresh() {
|
||||
void Music::Refresh() {
|
||||
if (artist != musicService.getArtist()) {
|
||||
artist = musicService.getArtist();
|
||||
currentLength = 0;
|
||||
@@ -216,8 +219,6 @@ bool Music::Refresh() {
|
||||
} else {
|
||||
lv_label_set_text(txtPlayPause, Symbols::play);
|
||||
}
|
||||
|
||||
return running;
|
||||
}
|
||||
|
||||
void Music::UpdateLength() {
|
||||
@@ -303,4 +304,4 @@ bool Music::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user