From 6fd0c09a16d5d1b73743e91184584e136894b810 Mon Sep 17 00:00:00 2001 From: Pratik Canopas <109139581+cp-pratik-k@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:58:59 +0530 Subject: [PATCH] Minor fix album (#116) --- .../albums/media_list/album_media_list_state_notifier.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/lib/ui/flow/albums/media_list/album_media_list_state_notifier.dart b/app/lib/ui/flow/albums/media_list/album_media_list_state_notifier.dart index e0e77e8..8807326 100644 --- a/app/lib/ui/flow/albums/media_list/album_media_list_state_notifier.dart +++ b/app/lib/ui/flow/albums/media_list/album_media_list_state_notifier.dart @@ -60,10 +60,8 @@ class AlbumMediaListStateNotifier extends StateNotifier { ); final moreMediaIds = state.album.medias - .sublist( - (reload ? 0 : _loadedMediaCount), - ) - .take(_loadedMediaCount + (reload ? _loadedMediaCount : 30)) + .sublist(reload ? 0 : _loadedMediaCount) + .take(reload ? _loadedMediaCount : 30) .toList(); Map medias = {}; @@ -236,6 +234,7 @@ class AlbumMediaListStateNotifier extends StateNotifier { (element) => !medias.contains(element), ) .toList(), + album: state.album.copyWith(medias: updatedMedias), medias: {...state.medias, ...moreMedia}, ); } catch (e, s) {