From c85a271ef63ac006bf10f71adae102552298b661 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Fri, 20 Sep 2024 14:16:23 -0500 Subject: Additional moderation (#5172) * Set up additional mod authorities * Filter out non-configurable mod authorities * WIP * Working * Cleanup, add mod * Cleanup * Add more debug logs * Tweak logs * Filter out imperative labels from typeaheads * Filter hideable content from notifications * Add api * Fall back in dev * Remove space * Use prod endpoint * Add tiny notice * Add notice to labeler card, show all labelers --- src/App.native.tsx | 76 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 31 deletions(-) (limited to 'src/App.native.tsx') diff --git a/src/App.native.tsx b/src/App.native.tsx index 2ec666e2c..e2fcd6d2e 100644 --- a/src/App.native.tsx +++ b/src/App.native.tsx @@ -29,6 +29,11 @@ import {Provider as A11yProvider} from '#/state/a11y' import {Provider as MutedThreadsProvider} from '#/state/cache/thread-mutes' import {Provider as DialogStateProvider} from '#/state/dialogs' import {listenSessionDropped} from '#/state/events' +import { + beginResolveGeolocation, + ensureGeolocationResolved, + Provider as GeolocationProvider, +} from '#/state/geolocation' import {Provider as InvitesStateProvider} from '#/state/invites' import {Provider as LightboxStateProvider} from '#/state/lightbox' import {MessagesProvider} from '#/state/messages' @@ -66,6 +71,11 @@ import {BackgroundNotificationPreferencesProvider} from '../modules/expo-backgro SplashScreen.preventAutoHideAsync() +/** + * Begin geolocation ASAP + */ +beginResolveGeolocation() + function InnerApp() { const [isReady, setIsReady] = React.useState(false) const {currentAccount} = useSession() @@ -158,7 +168,9 @@ function App() { const [isReady, setReady] = useState(false) React.useEffect(() => { - initPersistedState().then(() => setReady(true)) + Promise.all([initPersistedState(), ensureGeolocationResolved()]).then(() => + setReady(true), + ) }, []) if (!isReady) { @@ -170,36 +182,38 @@ function App() { * that is set up in the InnerApp component above. */ return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ) } -- cgit 1.4.1