From 99b126f0ef1b8a8d115678eda2c1a2dfae0094e9 Mon Sep 17 00:00:00 2001 From: Willy-JL Date: Sat, 11 Feb 2023 17:34:43 +0000 Subject: [PATCH] Fix archive tab switch code --- applications/main/archive/helpers/archive_browser.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/applications/main/archive/helpers/archive_browser.c b/applications/main/archive/helpers/archive_browser.c index 5583c43f5..3163b8cff 100644 --- a/applications/main/archive/helpers/archive_browser.c +++ b/applications/main/archive/helpers/archive_browser.c @@ -457,13 +457,10 @@ void archive_switch_tab(ArchiveBrowserView* browser, InputKey key) { browser->last_tab_switch_dir = key; - for(int i = 0; i < 2; i++) { - if(key == InputKeyLeft) { - tab = ((tab - 1) + ArchiveTabTotal) % ArchiveTabTotal; - } else { - tab = (tab + 1) % ArchiveTabTotal; - } - break; + if(key == InputKeyLeft) { + tab = ((tab - 1) + ArchiveTabTotal) % ArchiveTabTotal; + } else { + tab = (tab + 1) % ArchiveTabTotal; } browser->is_root = true;