[FL-1917] Archive: fix duplicates in favorites (#749)
* Archive: fix last_offset usage when switching to another tab * fix the fix
This commit is contained in:
		| @@ -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; | ||||
|         }); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user