Skip to content

Commit ada1823

Browse files
authoredMar 4, 2023
PTS: Fix double tap behaviour on settings screen (InfiniTimeOrg#1669)
Fixes InfiniTimeOrg#1467 "Double tapping PineTimeStyle steps style button sends watch to sleep" Double tap is disabled on the color settings screen by checking if the Rnd button is visible, but this didn't work for the options screen as the Rnd button isn't visible. I've changed it to check if the Close button is visible instead, which is used on both settings screens, and resolves the bug. I also changed the button used to disable the long press behaviour which was an as-yet-undiscovered bug which would have allowed the long press action to be used when the options screen was visible.
1 parent 08b4cfb commit ada1823

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/displayapp/screens/WatchFacePineTimeStyle.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -364,13 +364,13 @@ WatchFacePineTimeStyle::~WatchFacePineTimeStyle() {
364364
}
365365

366366
bool WatchFacePineTimeStyle::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
367-
if ((event == Pinetime::Applications::TouchEvents::LongTap) && lv_obj_get_hidden(btnRandom)) {
367+
if ((event == Pinetime::Applications::TouchEvents::LongTap) && lv_obj_get_hidden(btnClose)) {
368368
lv_obj_set_hidden(btnSetColor, false);
369369
lv_obj_set_hidden(btnSetOpts, false);
370370
savedTick = lv_tick_get();
371371
return true;
372372
}
373-
if ((event == Pinetime::Applications::TouchEvents::DoubleTap) && (lv_obj_get_hidden(btnRandom) == false)) {
373+
if ((event == Pinetime::Applications::TouchEvents::DoubleTap) && (lv_obj_get_hidden(btnClose) == false)) {
374374
return true;
375375
}
376376
return false;

0 commit comments

Comments
 (0)
Please sign in to comment.