Re-add periodic refresh on topbar and layout
This commit is contained in:
@@ -198,11 +198,11 @@ void Layout::checkEvents()
|
||||
LayoutBase::checkEvents();
|
||||
decorate();
|
||||
|
||||
// uint32_t now = RTOS_GET_MS();
|
||||
// if (now - lastRefresh >= LAYOUT_REFRESH) {
|
||||
// lastRefresh = now;
|
||||
// invalidate();
|
||||
// }
|
||||
uint32_t now = RTOS_GET_MS();
|
||||
if (now - lastRefresh >= LAYOUT_REFRESH) {
|
||||
lastRefresh = now;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void Layout::decorate()
|
||||
|
||||
@@ -165,9 +165,9 @@ void TopBar::paint(BitmapBuffer * dc)
|
||||
|
||||
void TopBar::checkEvents()
|
||||
{
|
||||
// uint32_t now = RTOS_GET_MS();
|
||||
// if (now - lastRefresh >= TOPBAR_REFRESH) {
|
||||
// lastRefresh = now;
|
||||
// invalidate();
|
||||
// }
|
||||
uint32_t now = RTOS_GET_MS();
|
||||
if (now - lastRefresh >= TOPBAR_REFRESH) {
|
||||
lastRefresh = now;
|
||||
invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user