diff options
author | dan <dan.abramov@gmail.com> | 2024-02-08 20:37:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 12:37:08 -0800 |
commit | 06f81d69486f2e6e8ffd65da5a4bfdcd7d8a2655 (patch) | |
tree | 041b9ddf0c44c871c6de14e96a65371c9c6c416d /src/App.web.tsx | |
parent | 80c482b026ad956e3a2bbfba864821a736e413f6 (diff) | |
download | voidsky-06f81d69486f2e6e8ffd65da5a4bfdcd7d8a2655.tar.zst |
Keep pager feeds in sync with the right pane (#2775)
* Hoist selected feed state * Seed state from params * Refine and fix logic * Fix scroll restoration * Soft reset on second click
Diffstat (limited to 'src/App.web.tsx')
-rw-r--r-- | src/App.web.tsx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/App.web.tsx b/src/App.web.tsx index 9d1bd3506..f10bb194d 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -22,6 +22,7 @@ import {Provider as MutedThreadsProvider} from 'state/muted-threads' import {Provider as InvitesStateProvider} from 'state/invites' import {Provider as PrefsStateProvider} from 'state/preferences' import {Provider as LoggedOutViewProvider} from 'state/shell/logged-out' +import {Provider as SelectedFeedProvider} from 'state/shell/selected-feed' import I18nProvider from './locale/i18nProvider' import { Provider as SessionProvider, @@ -52,17 +53,19 @@ function InnerApp() { // Resets the entire tree below when it changes: key={currentAccount?.did}> <LoggedOutViewProvider> - <UnreadNotifsProvider> - <ThemeProvider theme={theme}> - {/* All components should be within this provider */} - <RootSiblingParent> - <SafeAreaProvider> - <Shell /> - </SafeAreaProvider> - </RootSiblingParent> - <ToastContainer /> - </ThemeProvider> - </UnreadNotifsProvider> + <SelectedFeedProvider> + <UnreadNotifsProvider> + <ThemeProvider theme={theme}> + {/* All components should be within this provider */} + <RootSiblingParent> + <SafeAreaProvider> + <Shell /> + </SafeAreaProvider> + </RootSiblingParent> + <ToastContainer /> + </ThemeProvider> + </UnreadNotifsProvider> + </SelectedFeedProvider> </LoggedOutViewProvider> </React.Fragment> </Alf> |