Skip to content

Commit

Permalink
Minor fix album
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k committed Jan 10, 2025
1 parent f43ece8 commit 9cae81e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class AlbumMediaListStateNotifier extends StateNotifier<AlbumMediaListState> {
);

final moreMediaIds = state.album.medias
.sublist(
(reload ? 0 : _loadedMediaCount),
)
.take(_loadedMediaCount + (reload ? _loadedMediaCount : 30))
.sublist(reload ? 0 : _loadedMediaCount)
.take(reload ? _loadedMediaCount : 30)
.toList();

Map<String, AppMedia> medias = {};
Expand Down Expand Up @@ -236,6 +234,7 @@ class AlbumMediaListStateNotifier extends StateNotifier<AlbumMediaListState> {
(element) => !medias.contains(element),
)
.toList(),
album: state.album.copyWith(medias: updatedMedias),
medias: {...state.medias, ...moreMedia},
);
} catch (e, s) {
Expand Down

0 comments on commit 9cae81e

Please sign in to comment.