Skip to content

Commit b78b922

Browse files
committed
Change to LV_EVENT_CLICKED so swipe up and down works better
1 parent 2974b37 commit b78b922

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎src/displayapp/screens/WatchFaceDigital.cpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,12 @@ void WatchFaceDigital::Refresh() {
209209
}
210210

211211
void WatchFaceDigital::OnButtonEvent(lv_obj_t* object, lv_event_t event) {
212-
if (object == stepIcon && event == LV_EVENT_PRESSED) {
212+
if (event != LV_EVENT_CLICKED) {
213+
return;
214+
}
215+
if (object == stepIcon) {
213216
app->StartApp(Apps::Steps, DisplayApp::FullRefreshDirections::Up);
214-
} else if (object == weatherIcon && event == LV_EVENT_PRESSED) {
217+
} else if (object == weatherIcon) {
215218
app->StartApp(Apps::Weather, DisplayApp::FullRefreshDirections::Up);
216219
}
217220
}

0 commit comments

Comments
 (0)