From c388458462e99a79aa85926e9e84ec07fb09305c Mon Sep 17 00:00:00 2001 From: its your bedtime <23366927+itsyourbedtime@users.noreply.github.com> Date: Fri, 2 Jul 2021 14:30:30 +0300 Subject: [PATCH] [FL-1281] Unlocked screen fix+ (#556) * Dolphin app: fix "Unlocked" popup timeout on menu enter * FL-1404: fix word wrap index --- applications/dolphin/dolphin.c | 7 +++++++ applications/gui/elements.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/applications/dolphin/dolphin.c b/applications/dolphin/dolphin.c index 4b6f8839..2d221601 100644 --- a/applications/dolphin/dolphin.c +++ b/applications/dolphin/dolphin.c @@ -110,8 +110,15 @@ bool dolphin_view_idle_main_input(InputEvent* event, void* context) { // unlocked if(!dolphin->locked) { if(event->key == InputKeyOk && event->type == InputTypeShort) { + with_view_model( + dolphin->idle_view_main, (DolphinViewMainModel * model) { + model->hint_timeout = 0; // clear hint timeout + return true; + }); + with_value_mutex( dolphin->menu_vm, (Menu * menu) { menu_ok(menu); }); + } else if(event->key == InputKeyUp && event->type == InputTypeShort) { osTimerStart(dolphin->timeout_timer, 40); view_dispatcher_switch_to_view(dolphin->idle_view_dispatcher, DolphinViewLockMenu); diff --git a/applications/gui/elements.c b/applications/gui/elements.c index 8217b6ef..d2896e57 100644 --- a/applications/gui/elements.c +++ b/applications/gui/elements.c @@ -236,7 +236,7 @@ void elements_multiline_text_aligned( string_t buff; string_init_set(buff, str); size_t s_len = string_size(str); - uint8_t end_pos = s_len - ((len_px - px_left) / (len_px / s_len) + 2); + uint8_t end_pos = s_len - ((len_px - px_left) / (len_px / s_len) + 5); string_left(buff, end_pos); string_cat(buff, "-");