fix(mobile): asset state change not updated in gallery app bar (#4441)

This commit is contained in:
shenlong 2023-10-12 02:10:59 +00:00 committed by GitHub
parent 18fcca2884
commit 5dacea6f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View file

@ -200,6 +200,12 @@ final assetDetailProvider =
}
});
final assetWatcher =
StreamProvider.autoDispose.family<Asset?, Asset>((ref, asset) {
final db = ref.watch(dbProvider);
return db.assets.watchObject(asset.id, fireImmediately: true);
});
final assetsProvider =
StreamProvider.family<RenderList, int?>((ref, userId) async* {
if (userId == null) return;