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
3 changed files with 14 additions and 10 deletions

View File

@@ -297,10 +297,8 @@ class GalleryViewerPage extends HookConsumerWidget {
child: TopControlAppBar(
isPlayingMotionVideo: isPlayingMotionVideo.value,
asset: asset(),
isFavorite: asset().isFavorite,
onMoreInfoPressed: showInfo,
onFavorite:
asset().isRemote ? () => toggleFavorite(asset()) : null,
onFavorite: toggleFavorite,
onUploadPressed:
asset().isLocal ? () => handleUpload(asset()) : null,
onDownloadPressed: asset().isLocal