Skip to content

armgit / ente

Public Imported from GitHub
0

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

Put remove behind feature flag

Neeraj Gupta39a3f390c557
diff --git a/web/packages/new/photos/services/pull.ts b/web/packages/new/photos/services/pull.ts
index 3b12a45629..91ddf78a74 100644
--- a/web/packages/new/photos/services/pull.ts
+++ b/web/packages/new/photos/services/pull.ts
@@ -12,7 +12,7 @@ import {
} from "./collection";
import { isMLSupported, mlSync, pullMLStatus } from "./ml";
import { searchDataSync } from "./search";
-import { pullSettings } from "./settings";
+import { pullSettings, settingsSnapshot } from "./settings";
import { pullTrash, type TrashItem } from "./trash";
/**
@@ -113,8 +113,11 @@ export const pullFiles = async (opts?: PullFilesOpts) => {
videoPrunePermanentlyDeletedFileIDsIfNeeded,
);
// After trash sync, fetch pending removal actions and move affected files
- // to the uncategorized collection.
- await movePendingRemovalActionsToUncategorized(collections);
+ // to the uncategorized collection. This is gated behind the admin role
+ // feature flag since it's related to admin removal functionality.
+ if (settingsSnapshot().isAdminRoleEnabled) {
+ await movePendingRemovalActionsToUncategorized(collections);
+ }
if (didUpdateFiles) {
// TODO: Ok for now since its is only commented for the deduper (gallery
// does this by providing onDidUpdateCollectionFiles), but still needs