Skip to content

Commit e9a4ec1

Browse files
author
MargeBot
committed
Merge branch 'cleanup-mailbox-refactoring' into 'main'
[Cleanup] Remove redundant code by removing MailboxRefactoring flag See merge request web/clients!18217
2 parents 678bf43 + 9a59028 commit e9a4ec1

File tree

15 files changed

+101
-1448
lines changed

15 files changed

+101
-1448
lines changed

applications/mail/src/app/MainContainer.tsx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ import { useInboxDesktopMetrics } from '@proton/components/hooks/useInboxDesktop
1515
import { FeatureCode, useFeatures } from '@proton/features';
1616
import AssistantProvider from '@proton/llm/lib/providers/AssistantProvider';
1717
import { useInboxDesktopHeartbeat } from '@proton/shared/lib/desktop/heartbeat';
18-
import { useFlag } from '@proton/unleash';
1918

2019
import { CheckAllRefProvider } from 'proton-mail/containers/CheckAllRefProvider';
2120

22-
import { MAIN_ROUTE_PATH, ROUTE_MAIN } from './constants';
21+
import { ROUTE_MAIN } from './constants';
2322
import ComposerContainer from './containers/ComposerContainer';
2423
import EncryptedSearchProvider from './containers/EncryptedSearchProvider';
25-
import PageContainer from './containers/PageContainer';
2624
import ChecklistsProvider from './containers/onboardingChecklist/provider/ChecklistsProvider';
2725
import { MailContentRefProvider } from './hooks/useClickMailContent';
2826
import MailAppShell from './router/MailAppShell';
@@ -46,9 +44,6 @@ const MainContainer: FunctionComponent = () => {
4644
useInboxDesktopHeartbeat();
4745
useInboxDesktopMetrics();
4846

49-
// Used to control the refactoring of the mailbox that breaks `MailboxContainer` in smaller components
50-
const isRefactoringEnabled = useFlag('MailboxRefactoring');
51-
5247
/**
5348
* @description React has an issue regarding DOM changed by Gtranslate from Chrome
5449
* The only part not tracked by React is the message view which is great.
@@ -103,17 +98,10 @@ const MainContainer: FunctionComponent = () => {
10398
<ModalsChildren />
10499
<ApiModalsHVUpsell api={extraThunkArguments.api} />
105100
<Switch>
106-
{isRefactoringEnabled ? (
107-
<Route
108-
path={ROUTE_MAIN}
109-
render={() => <MailAppShell ref={mailContentRef} />}
110-
/>
111-
) : (
112-
<Route
113-
path={MAIN_ROUTE_PATH}
114-
render={() => <PageContainer ref={mailContentRef} />}
115-
/>
116-
)}
101+
<Route
102+
path={ROUTE_MAIN}
103+
render={() => <MailAppShell ref={mailContentRef} />}
104+
/>
117105
</Switch>
118106
</CheckAllRefProvider>
119107
</ComposerContainer>

0 commit comments

Comments
 (0)