Skip to content

armgit / ente

Public Imported from GitHub
0

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

Cleanup

Manav Rathibf8e2710886f
diff --git a/web/apps/photos/src/components/Collections/CollectionHeader.tsx b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
index 031182a9d1..7958ef6928 100644
--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
@@ -140,13 +140,8 @@ const CollectionOptions: React.FC<CollectionOptionsProps> = ({
setFilesDownloadProgressAttributesCreator,
isActiveCollectionDownloadInProgress,
}) => {
- const {
- showLoadingBar,
- hideLoadingBar,
- onGenericError,
- setDialogMessage,
- showMiniDialog,
- } = useAppContext();
+ const { showLoadingBar, hideLoadingBar, onGenericError, showMiniDialog } =
+ useAppContext();
const { syncWithRemote } = useContext(GalleryContext);
const overFlowMenuIconRef = useRef<SVGSVGElement>(null);
diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsx
index 124eff1b4e..3a4e638e2e 100644
--- a/web/apps/photos/src/pages/_app.tsx
+++ b/web/apps/photos/src/pages/_app.tsx
@@ -26,8 +26,6 @@ import { runMigrations } from "@/new/photos/services/migrations";
import { initML, isMLSupported } from "@/new/photos/services/ml";
import { getFamilyPortalRedirectURL } from "@/new/photos/services/user-details";
import { AppContext } from "@/new/photos/types/context";
-import DialogBox from "@ente/shared/components/DialogBox";
-import { DialogBoxAttributes } from "@ente/shared/components/DialogBox/types";
import { MessageContainer } from "@ente/shared/components/MessageContainer";
import { useLocalState } from "@ente/shared/hooks/useLocalState";
import HTTPService from "@ente/shared/network/HTTPService";
@@ -64,8 +62,6 @@ export default function App({ Component, pageProps }: AppProps) {
typeof window !== "undefined" && !window.navigator.onLine,
);
const [showNavbar, setShowNavBar] = useState(false);
- const [dialogMessage, setDialogMessage] = useState<DialogBoxAttributes>();
- const [messageDialogView, setMessageDialogView] = useState(false);
const [watchFolderView, setWatchFolderView] = useState(false);
const [watchFolderFiles, setWatchFolderFiles] = useState<FileList>(null);
const [notificationView, setNotificationView] = useState(false);
@@ -181,10 +177,6 @@ export default function App({ Component, pageProps }: AppProps) {
};
}, []);
- useEffect(() => {
- setMessageDialogView(true);
- }, [dialogMessage]);
-
useEffect(() => {
setNotificationView(true);
}, [notificationAttributes]);
@@ -209,7 +201,6 @@ export default function App({ Component, pageProps }: AppProps) {
showNavBar,
showLoadingBar,
hideLoadingBar,
- setDialogMessage,
watchFolderView,
setWatchFolderView,
watchFolderFiles,
@@ -236,13 +227,6 @@ export default function App({ Component, pageProps }: AppProps) {
</MessageContainer>
<LoadingBar color="#51cd7c" ref={loadingBarRef} />
- <DialogBox
- sx={{ zIndex: photosDialogZIndex }}
- size="xs"
- open={messageDialogView}
- onClose={() => setMessageDialogView(false)}
- attributes={dialogMessage}
- />
<AttributedMiniDialog
sx={{ zIndex: photosDialogZIndex }}
{...miniDialogProps}
diff --git a/web/packages/new/photos/types/context.ts b/web/packages/new/photos/types/context.ts
index d522e1f8b9..dfc2638286 100644
--- a/web/packages/new/photos/types/context.ts
+++ b/web/packages/new/photos/types/context.ts
@@ -1,6 +1,5 @@
import type { AccountsContextT } from "@/accounts/types/context";
import { ensure } from "@/utils/ensure";
-import type { SetDialogBoxAttributes } from "@ente/shared/components/DialogBox/types";
import { THEME_COLOR } from "@ente/shared/themes/constants";
import { createContext, useContext } from "react";
import type { SetNotificationAttributes } from "./notification";
@@ -22,10 +21,6 @@ export type AppContextT = AccountsContextT & {
* Show a generic error dialog, and log the given error.
*/
onGenericError: (error: unknown) => void;
- /**
- * Deprecated, use showMiniDialog instead.
- */
- setDialogMessage: SetDialogBoxAttributes;
setNotificationAttributes: SetNotificationAttributes;
watchFolderView: boolean;
setWatchFolderView: (isOpen: boolean) => void;
diff --git a/web/packages/shared/components/DialogBox/types.ts b/web/packages/shared/components/DialogBox/types.ts
index 079017b4bd..7b22d48433 100644
--- a/web/packages/shared/components/DialogBox/types.ts
+++ b/web/packages/shared/components/DialogBox/types.ts
@@ -34,7 +34,3 @@ export interface DialogBoxAttributes {
disabled?: boolean;
};
}
-
-export type SetDialogBoxAttributes = React.Dispatch<
- React.SetStateAction<DialogBoxAttributes>
->;