High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(mobile): photos group by date in album page view (#16272)
ExceptionsOccurc0fe98fe27f2
diff --git a/mobile/lib/interfaces/timeline.interface.dart b/mobile/lib/interfaces/timeline.interface.dartindex 2d46dbf688..178cd4a39c 100644--- a/mobile/lib/interfaces/timeline.interface.dart+++ b/mobile/lib/interfaces/timeline.interface.dart@@ -5,7 +5,10 @@ abstract class ITimelineRepository {Stream<RenderList> watchArchiveTimeline(int userId);Stream<RenderList> watchFavoriteTimeline(int userId);Stream<RenderList> watchTrashTimeline(int userId);- Stream<RenderList> watchAlbumTimeline(Album album);+ Stream<RenderList> watchAlbumTimeline(+ Album album,+ GroupAssetsBy groupAssetsBy,+ );Stream<RenderList> watchAllVideosTimeline();Stream<RenderList> watchHomeTimeline(int userId, GroupAssetsBy groupAssetsBy);diff --git a/mobile/lib/repositories/timeline.repository.dart b/mobile/lib/repositories/timeline.repository.dartindex 8203e5c6e9..7b3f169750 100644--- a/mobile/lib/repositories/timeline.repository.dart+++ b/mobile/lib/repositories/timeline.repository.dart@@ -42,14 +42,17 @@ class TimelineRepository extends DatabaseRepository}@override- Stream<RenderList> watchAlbumTimeline(Album album) {+ Stream<RenderList> watchAlbumTimeline(+ Album album,+ GroupAssetsBy groupAssetByOption,+ ) {final query = album.assets.filter().isTrashedEqualTo(false);final withSortedOption = switch (album.sortOrder) {SortOrder.asc => query.sortByFileCreatedAt(),SortOrder.desc => query.sortByFileCreatedAtDesc(),};- return _watchRenderList(withSortedOption, GroupAssetsBy.none);+ return _watchRenderList(withSortedOption, groupAssetByOption);}@overridediff --git a/mobile/lib/services/timeline.service.dart b/mobile/lib/services/timeline.service.dartindex e435ba72c9..513b1b1ab2 100644--- a/mobile/lib/services/timeline.service.dart+++ b/mobile/lib/services/timeline.service.dart@@ -50,7 +50,10 @@ class TimelineService {}Stream<RenderList> watchAlbumTimeline(Album album) async* {- yield* _timelineRepository.watchAlbumTimeline(album);+ yield* _timelineRepository.watchAlbumTimeline(+ album,+ _getGroupByOption(),+ );}Stream<RenderList> watchTrashTimeline() async* {