Skip to content

Commit

Permalink
fix(mobile): do not show trashed assets in album viewer page (#4894)
Browse files Browse the repository at this point in the history
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
  • Loading branch information
shenlong-tanwen and shenlong-tanwen authored Nov 7, 2023
1 parent 2dca285 commit c2c26c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class TrashNotifier extends StateNotifier<bool> {
.remoteIdProperty()
.findAll();

// TODO: handle local asset removal on emptyTrash
_ref
.read(syncServiceProvider)
.handleRemoteAssetRemoval(idsToRemove.cast<String>().toList());
Expand Down
3 changes: 2 additions & 1 deletion mobile/lib/shared/models/album.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ class Album {
}

Stream<void> watchRenderList(GroupAssetsBy groupAssetsBy) async* {
final query = assets.filter().sortByFileCreatedAtDesc();
final query =
assets.filter().isTrashedEqualTo(false).sortByFileCreatedAtDesc();
_renderList = await RenderList.fromQuery(query, groupAssetsBy);
yield _renderList;
await for (final _ in query.watchLazy()) {
Expand Down

0 comments on commit c2c26c4

Please sign in to comment.