diff --git a/web/packages/new/photos/components/SelectedFileOptions.tsx b/web/packages/new/photos/components/SelectedFileOptions.tsx index 421140af60..d05b291f77 100644 --- a/web/packages/new/photos/components/SelectedFileOptions.tsx +++ b/web/packages/new/photos/components/SelectedFileOptions.tsx @@ -201,29 +201,24 @@ export const SelectedFileOptions: React.FC = ({ }); const handleRemoveFromCollection = () => { - const action = () => onRemoveFilesFromCollection(collection!); + const remove = () => onRemoveFilesFromCollection(collection!); - showMiniDialog( - selectedFileCount == selectedOwnFileCount - ? { - title: t("remove_from_album"), - message: t("confirm_remove_message"), - continue: { - text: t("yes_remove"), - color: "primary", - action, - }, - } - : { - title: t("remove_from_album"), - message: t("confirm_remove_incl_others_message"), - continue: { - text: t("yes_remove"), - color: "critical", - action, - }, - }, - ); + if (collectionSummary?.attributes.has("sharedIncoming")) { + remove(); + } else { + const onlyUserFiles = selectedFileCount == selectedOwnFileCount; + showMiniDialog({ + title: t("remove_from_album"), + message: onlyUserFiles + ? t("confirm_remove_message") + : t("confirm_remove_incl_others_message"), + continue: { + text: t("yes_remove"), + color: onlyUserFiles ? "primary" : "critical", + action: remove, + }, + }); + } }; const handleMoveToCollection = () => {