diff options
author | its your bedtime <23366927+itsyourbedtime@users.noreply.github.com> | 2021-10-07 12:41:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 12:41:30 +0300 |
commit | 1dd96419ab3c82306d5d55c7053117624207ef3e (patch) | |
tree | cb3c8daa019cc0fe3e37f6425f77fb7cd02842ad /applications/archive | |
parent | 5232d5daba66640bf2fdf1955f9c723c377bd09e (diff) |
[FL-1917] Archive: fix duplicates in favorites (#749)
* Archive: fix last_offset usage when switching to another tab
* fix the fix
Diffstat (limited to 'applications/archive')
-rw-r--r-- | applications/archive/helpers/archive_browser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/applications/archive/helpers/archive_browser.c b/applications/archive/helpers/archive_browser.c index 19907984..5dec45b5 100644 --- a/applications/archive/helpers/archive_browser.c +++ b/applications/archive/helpers/archive_browser.c @@ -10,7 +10,9 @@ void archive_update_offset(ArchiveBrowserView* browser) { if(array_size > 3 && model->idx >= array_size - 1) { model->list_offset = model->idx - 3; - } else if(model->last_offset && model->last_offset != model->list_offset) { + } else if( + model->last_offset && model->last_offset != model->list_offset && + model->tab_idx == model->last_tab) { model->list_offset = model->last_offset; model->last_offset = !model->last_offset; } else if(model->list_offset < model->idx - bounds) { @@ -18,7 +20,6 @@ void archive_update_offset(ArchiveBrowserView* browser) { } else if(model->list_offset > model->idx - bounds) { model->list_offset = CLAMP(model->idx - 1, array_size - bounds, 0); } - return true; }); } |