From 7a45db38812f50649f6501fa43acfc16d16dc2b5 Mon Sep 17 00:00:00 2001 From: Andrey Zakharov Date: Wed, 2 Aug 2023 08:19:00 +0300 Subject: [PATCH] Fix about screen (#2907) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix about screen * About: use COUNT_OF Co-authored-by: Andrey Zakharov Co-authored-by: あく --- applications/settings/about/about.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applications/settings/about/about.c b/applications/settings/about/about.c index 55bd43e5..dcd7656f 100644 --- a/applications/settings/about/about.c +++ b/applications/settings/about/about.c @@ -87,6 +87,7 @@ static DialogMessageButton icon2_screen(DialogsApp* dialogs, DialogMessage* mess message, furi_hal_version_get_mic_id(), 63, 27, AlignLeft, AlignCenter); result = dialog_message_show(dialogs, message); dialog_message_set_icon(message, NULL, 0, 0); + dialog_message_set_text(message, NULL, 0, 0, AlignLeft, AlignTop); return result; } @@ -172,8 +173,6 @@ const AboutDialogScreen about_screens[] = { hw_version_screen, fw_version_screen}; -const size_t about_screens_count = sizeof(about_screens) / sizeof(AboutDialogScreen); - int32_t about_settings_app(void* p) { UNUSED(p); DialogsApp* dialogs = furi_record_open(RECORD_DIALOGS); @@ -194,7 +193,7 @@ int32_t about_settings_app(void* p) { view_dispatcher_switch_to_view(view_dispatcher, empty_screen_index); while(1) { - if(screen_index >= about_screens_count - 1) { + if(screen_index >= COUNT_OF(about_screens) - 1) { dialog_message_set_buttons(message, "Back", NULL, NULL); } else { dialog_message_set_buttons(message, "Back", NULL, "Next"); @@ -209,7 +208,7 @@ int32_t about_settings_app(void* p) { screen_index--; } } else if(screen_result == DialogMessageButtonRight) { - if(screen_index < about_screens_count) { + if(screen_index < COUNT_OF(about_screens) - 1) { screen_index++; } } else if(screen_result == DialogMessageButtonBack) {