Skip to content

armgit / ente

Public Imported from GitHub
0

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

Visually better sequence

Manav Rathie3ed92e93036
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 9a7c85078f..fe51706e55 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -666,7 +666,6 @@ const Page: React.FC = () => {
(op: CollectionOp) => (selectedCollection: Collection) => {
void (async () => {
showLoadingBar();
- let notifyOthersFiles = false;
try {
setOpenCollectionSelector(false);
const selectedFiles = getSelectedFiles(
@@ -686,8 +685,9 @@ const Page: React.FC = () => {
);
}
// See: [Note: Add and move of non-user files]
- notifyOthersFiles =
- userFiles.length != selectedFiles.length;
+ if (userFiles.length != selectedFiles.length) {
+ showMiniDialog(notifyOthersFilesDialogAttributes());
+ }
clearSelection();
await remotePull({ silent: true });
} catch (e) {
@@ -695,10 +695,6 @@ const Page: React.FC = () => {
} finally {
hideLoadingBar();
}
-
- if (notifyOthersFiles) {
- showMiniDialog(notifyOthersFilesDialogAttributes());
- }
})();
};
@@ -726,7 +722,6 @@ const Page: React.FC = () => {
const createFileOpHandler = (op: FileOp) => () => {
void (async () => {
showLoadingBar();
- let notifyOthersFiles = false;
try {
const selectedFiles = getSelectedFiles(
selected,
@@ -763,8 +758,9 @@ const Page: React.FC = () => {
// on the user's own files.
//
// See: [Note: Add and move of non-user files].
- notifyOthersFiles =
- toProcessFiles.length != selectedFiles.length;
+ if (toProcessFiles.length != selectedFiles.length) {
+ showMiniDialog(notifyOthersFilesDialogAttributes());
+ }
clearSelection();
await remotePull({ silent: true });
} catch (e) {
@@ -772,9 +768,6 @@ const Page: React.FC = () => {
} finally {
hideLoadingBar();
}
- if (notifyOthersFiles) {
- showMiniDialog(notifyOthersFilesDialogAttributes());
- }
})();
};