Refresh rework
This commit is contained in:
@@ -47,13 +47,16 @@ Notifications::Notifications(DisplayApp* app,
|
||||
timeoutTickCountStart = xTaskGetTickCount();
|
||||
timeoutTickCountEnd = timeoutTickCountStart + (5 * 1024);
|
||||
}
|
||||
|
||||
taskRefresh = lv_task_create(RefreshTaskCallback, LV_DISP_DEF_REFR_PERIOD, LV_TASK_PRIO_MID, this);
|
||||
}
|
||||
|
||||
Notifications::~Notifications() {
|
||||
lv_task_del(taskRefresh);
|
||||
lv_obj_clean(lv_scr_act());
|
||||
}
|
||||
|
||||
bool Notifications::Refresh() {
|
||||
void Notifications::Refresh() {
|
||||
if (mode == Modes::Preview) {
|
||||
auto tick = xTaskGetTickCount();
|
||||
int32_t pos = 240 - ((tick - timeoutTickCountStart) / ((timeoutTickCountEnd - timeoutTickCountStart) / 240));
|
||||
@@ -63,8 +66,6 @@ bool Notifications::Refresh() {
|
||||
timeoutLinePoints[1].x = pos;
|
||||
lv_line_set_points(timeoutLine, timeoutLinePoints, 2);
|
||||
}
|
||||
|
||||
return running;
|
||||
}
|
||||
|
||||
bool Notifications::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
|
||||
|
Reference in New Issue
Block a user