Skip to content

armgit / ente

Public Imported from GitHub
0

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

Align

Manav Rathi7f6974697a2e
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index a2fb7b8bd8..c1df4d780a 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -821,13 +821,9 @@ const Page: React.FC = () => {
});
// TODO(AR): Trigger a "lite" sync?
- dispatch({
- type: "markPendingVisibilityUpdate",
- fileID,
- mark: false,
- });
-
- // Keep this as the last operation on the happy path.
+ // The file viewer listens for the next update to files, so keep
+ // this as the first operation on the happy path that can
+ // trigger an update of files.
//
// See: [Note: File viewer update and dispatch]
dispatch({
@@ -835,13 +831,12 @@ const Page: React.FC = () => {
fileID,
privateMagicMetadata,
});
- } catch (e) {
+ } finally {
dispatch({
type: "markPendingVisibilityUpdate",
fileID,
mark: false,
});
- throw e;
}
},
[],