Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Preserve pending reaction state during sync

ashil-pilot9b4f417934d6
diff --git a/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart b/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
index b1a6343804..06ab56778a 100644
--- a/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
+++ b/mobile/apps/photos/lib/ui/social/widgets/file_social_overlay.dart
@@ -117,7 +117,11 @@ class _FileSocialOverlayState extends State<FileSocialOverlay> {
}
bool _isCurrentSocialRefresh(int refreshID) {
- return mounted && refreshID == _latestRefreshID;
+ return mounted &&
+ refreshID == _latestRefreshID &&
+ !_fileIDsWithReactionUpdateInProgress.contains(
+ widget.file.uploadedFileID,
+ );
}
bool _isOpenedFromHiddenCollection() {
@@ -289,6 +293,9 @@ class _FileSocialOverlayState extends State<FileSocialOverlay> {
);
} finally {
_fileIDsWithReactionUpdateInProgress.remove(fileID);
+ if (mounted && widget.file.uploadedFileID == fileID) {
+ unawaited(_refreshSocialState());
+ }
}
}