diff --git a/src/state/models/ui/shell.ts b/src/state/models/ui/shell.ts
index 343fff86..b5fa4e59 100644
--- a/src/state/models/ui/shell.ts
+++ b/src/state/models/ui/shell.ts
@@ -362,12 +362,7 @@ export class ShellUiModel {
setupLoginModals() {
this.rootStore.onSessionReady(() => {
- if (
- shouldRequestEmailConfirmation(
- this.rootStore.session,
- this.rootStore.onboarding,
- )
- ) {
+ if (shouldRequestEmailConfirmation(this.rootStore.session)) {
this.openModal({name: 'verify-email', showReminder: true})
setEmailConfirmationRequested()
}
diff --git a/src/state/shell/alt-text-required.tsx b/src/state/preferences/alt-text-required.tsx
similarity index 100%
rename from src/state/shell/alt-text-required.tsx
rename to src/state/preferences/alt-text-required.tsx
diff --git a/src/state/preferences/index.tsx b/src/state/preferences/index.tsx
index 56c93f81..50cb86c6 100644
--- a/src/state/preferences/index.tsx
+++ b/src/state/preferences/index.tsx
@@ -1,8 +1,17 @@
import React from 'react'
import {Provider as LanguagesProvider} from './languages'
+import {Provider as AltTextRequiredProvider} from '../preferences/alt-text-required'
export {useLanguagePrefs, useSetLanguagePrefs} from './languages'
+export {
+ useRequireAltTextEnabled,
+ useSetRequireAltTextEnabled,
+} from './alt-text-required'
export function Provider({children}: React.PropsWithChildren<{}>) {
- return {children}
+ return (
+
+ {children}
+
+ )
}
diff --git a/src/state/shell/index.tsx b/src/state/shell/index.tsx
index 0bb8988a..6291d322 100644
--- a/src/state/shell/index.tsx
+++ b/src/state/shell/index.tsx
@@ -3,7 +3,6 @@ import {Provider as DrawerOpenProvider} from './drawer-open'
import {Provider as DrawerSwipableProvider} from './drawer-swipe-disabled'
import {Provider as MinimalModeProvider} from './minimal-mode'
import {Provider as ColorModeProvider} from './color-mode'
-import {Provider as AltTextRequiredProvider} from './alt-text-required'
import {Provider as OnboardingProvider} from './onboarding'
export {useIsDrawerOpen, useSetDrawerOpen} from './drawer-open'
@@ -13,10 +12,6 @@ export {
} from './drawer-swipe-disabled'
export {useMinimalShellMode, useSetMinimalShellMode} from './minimal-mode'
export {useColorMode, useSetColorMode} from './color-mode'
-export {
- useRequireAltTextEnabled,
- useSetRequireAltTextEnabled,
-} from './alt-text-required'
export {useOnboardingState, useOnboardingDispatch} from './onboarding'
export function Provider({children}: React.PropsWithChildren<{}>) {
@@ -25,9 +20,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
-
- {children}
-
+ {children}
diff --git a/src/state/shell/reminders.e2e.ts b/src/state/shell/reminders.e2e.ts
index 6238ffa2..d7703e9e 100644
--- a/src/state/shell/reminders.e2e.ts
+++ b/src/state/shell/reminders.e2e.ts
@@ -1,10 +1,6 @@
-import {OnboardingModel} from '../models/discovery/onboarding'
import {SessionModel} from '../models/session'
-export function shouldRequestEmailConfirmation(
- _session: SessionModel,
- _onboarding: OnboardingModel,
-) {
+export function shouldRequestEmailConfirmation(_session: SessionModel) {
return false
}
diff --git a/src/state/shell/reminders.ts b/src/state/shell/reminders.ts
index d68a272a..e7ee7a5f 100644
--- a/src/state/shell/reminders.ts
+++ b/src/state/shell/reminders.ts
@@ -1,12 +1,9 @@
import * as persisted from '#/state/persisted'
-import {OnboardingModel} from '../models/discovery/onboarding'
import {SessionModel} from '../models/session'
import {toHashCode} from 'lib/strings/helpers'
+import {isOnboardingActive} from './onboarding'
-export function shouldRequestEmailConfirmation(
- session: SessionModel,
- onboarding: OnboardingModel,
-) {
+export function shouldRequestEmailConfirmation(session: SessionModel) {
const sess = session.currentSession
if (!sess) {
return false
@@ -14,7 +11,7 @@ export function shouldRequestEmailConfirmation(
if (sess.emailConfirmed) {
return false
}
- if (onboarding.isActive) {
+ if (isOnboardingActive()) {
return false
}
// only prompt once
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index 4ebbfd66..632e72fd 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -49,7 +49,7 @@ import {LabelsBtn} from './labels/LabelsBtn'
import {SelectLangBtn} from './select-language/SelectLangBtn'
import {EmojiPickerButton} from './text-input/web/EmojiPicker.web'
import {insertMentionAt} from 'lib/strings/mention-manip'
-import {useRequireAltTextEnabled} from '#/state/shell'
+import {useRequireAltTextEnabled} from '#/state/preferences'
import {
useLanguagePrefs,
useSetLanguagePrefs,
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index 37c2961b..570f8b7e 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -50,10 +50,12 @@ import {
useSetMinimalShellMode,
useColorMode,
useSetColorMode,
- useRequireAltTextEnabled,
- useSetRequireAltTextEnabled,
useOnboardingDispatch,
} from '#/state/shell'
+import {
+ useRequireAltTextEnabled,
+ useSetRequireAltTextEnabled,
+} from '#/state/preferences'
// TEMPORARY (APP-700)
// remove after backend testing finishes