diff options
Diffstat (limited to 'src/view/screens')
-rw-r--r-- | src/view/screens/Contacts.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/Home.tsx | 3 | ||||
-rw-r--r-- | src/view/screens/Notifications.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/PostDownvotedBy.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/PostRepostedBy.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/PostThread.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/PostUpvotedBy.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/Profile.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/ProfileFollowers.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/ProfileFollows.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/ProfileMembers.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/Search.tsx | 4 | ||||
-rw-r--r-- | src/view/screens/Settings.tsx | 7 |
13 files changed, 29 insertions, 25 deletions
diff --git a/src/view/screens/Contacts.tsx b/src/view/screens/Contacts.tsx index 65c933b38..c0e265ca7 100644 --- a/src/view/screens/Contacts.tsx +++ b/src/view/screens/Contacts.tsx @@ -8,13 +8,13 @@ import {colors} from '../lib/styles' import {ScreenParams} from '../routes' import {useStores} from '../../state' -export const Contacts = ({visible, params}: ScreenParams) => { +export const Contacts = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const selectorInterp = useSharedValue(0) useEffect(() => { if (visible) { - store.nav.setTitle(`Contacts`) + store.nav.setTitle(navIdx, `Contacts`) } }, [store, visible]) diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index 668ec3a75..609b1ca38 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -12,6 +12,7 @@ import {ScreenParams} from '../routes' import {s, colors} from '../lib/styles' export const Home = observer(function Home({ + navIdx, visible, scrollElRef, }: ScreenParams) { @@ -51,7 +52,7 @@ export const Home = observer(function Home({ console.log('Updating home feed') defaultFeedView.update() } else { - store.nav.setTitle('Home') + store.nav.setTitle(navIdx, 'Home') console.log('Fetching home feed') defaultFeedView.setup().then(() => { if (aborted) return diff --git a/src/view/screens/Notifications.tsx b/src/view/screens/Notifications.tsx index 71eda34de..7e4de497e 100644 --- a/src/view/screens/Notifications.tsx +++ b/src/view/screens/Notifications.tsx @@ -7,7 +7,7 @@ import {useStores} from '../../state' import {NotificationsViewModel} from '../../state/models/notifications-view' import {ScreenParams} from '../routes' -export const Notifications = ({visible}: ScreenParams) => { +export const Notifications = ({navIdx, visible}: ScreenParams) => { const [hasSetup, setHasSetup] = useState<boolean>(false) const [notesView, setNotesView] = useState< NotificationsViewModel | undefined @@ -24,7 +24,7 @@ export const Notifications = ({visible}: ScreenParams) => { console.log('Updating notifications feed') notesView?.update() } else { - store.nav.setTitle('Notifications') + store.nav.setTitle(navIdx, 'Notifications') const newNotesView = new NotificationsViewModel(store, {}) setNotesView(newNotesView) newNotesView.setup().then(() => { diff --git a/src/view/screens/PostDownvotedBy.tsx b/src/view/screens/PostDownvotedBy.tsx index a77476834..4d9752799 100644 --- a/src/view/screens/PostDownvotedBy.tsx +++ b/src/view/screens/PostDownvotedBy.tsx @@ -6,14 +6,14 @@ import {ScreenParams} from '../routes' import {useStores} from '../../state' import {makeRecordUri} from '../lib/strings' -export const PostDownvotedBy = ({visible, params}: ScreenParams) => { +export const PostDownvotedBy = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name, rkey} = params const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) useEffect(() => { if (visible) { - store.nav.setTitle('Downvoted by') + store.nav.setTitle(navIdx, 'Downvoted by') } }, [store, visible]) diff --git a/src/view/screens/PostRepostedBy.tsx b/src/view/screens/PostRepostedBy.tsx index 263af195d..8e8346693 100644 --- a/src/view/screens/PostRepostedBy.tsx +++ b/src/view/screens/PostRepostedBy.tsx @@ -6,14 +6,14 @@ import {ScreenParams} from '../routes' import {useStores} from '../../state' import {makeRecordUri} from '../lib/strings' -export const PostRepostedBy = ({visible, params}: ScreenParams) => { +export const PostRepostedBy = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name, rkey} = params const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) useEffect(() => { if (visible) { - store.nav.setTitle('Reposted by') + store.nav.setTitle(navIdx, 'Reposted by') } }, [store, visible]) diff --git a/src/view/screens/PostThread.tsx b/src/view/screens/PostThread.tsx index fc804f61e..69dda7426 100644 --- a/src/view/screens/PostThread.tsx +++ b/src/view/screens/PostThread.tsx @@ -6,14 +6,14 @@ import {PostThread as PostThreadComponent} from '../com/post-thread/PostThread' import {ScreenParams} from '../routes' import {useStores} from '../../state' -export const PostThread = ({visible, params}: ScreenParams) => { +export const PostThread = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name, rkey} = params const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) useEffect(() => { if (visible) { - store.nav.setTitle(`Post by ${name}`) + store.nav.setTitle(navIdx, `Post by ${name}`) } }, [visible, store.nav, name]) diff --git a/src/view/screens/PostUpvotedBy.tsx b/src/view/screens/PostUpvotedBy.tsx index 0bf662def..d87fa548d 100644 --- a/src/view/screens/PostUpvotedBy.tsx +++ b/src/view/screens/PostUpvotedBy.tsx @@ -6,14 +6,14 @@ import {ScreenParams} from '../routes' import {useStores} from '../../state' import {makeRecordUri} from '../lib/strings' -export const PostUpvotedBy = ({visible, params}: ScreenParams) => { +export const PostUpvotedBy = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name, rkey} = params const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey) useEffect(() => { if (visible) { - store.nav.setTitle('Upvoted by') + store.nav.setTitle(navIdx, 'Upvoted by') } }, [store, visible]) diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 0edb503da..e637c6ad8 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -23,7 +23,7 @@ const LOADING_ITEM = {_reactKey: '__loading__'} const END_ITEM = {_reactKey: '__end__'} const EMPTY_ITEM = {_reactKey: '__empty__'} -export const Profile = observer(({visible, params}: ScreenParams) => { +export const Profile = observer(({navIdx, visible, params}: ScreenParams) => { const store = useStores() const [hasSetup, setHasSetup] = useState<boolean>(false) const uiState = useMemo( @@ -41,7 +41,7 @@ export const Profile = observer(({visible, params}: ScreenParams) => { uiState.update() } else { console.log('Fetching profile for', params.name) - store.nav.setTitle(params.name) + store.nav.setTitle(navIdx, params.name) uiState.setup().then(() => { if (aborted) return setHasSetup(true) diff --git a/src/view/screens/ProfileFollowers.tsx b/src/view/screens/ProfileFollowers.tsx index ac776a056..b19a5bc37 100644 --- a/src/view/screens/ProfileFollowers.tsx +++ b/src/view/screens/ProfileFollowers.tsx @@ -5,13 +5,13 @@ import {ProfileFollowers as ProfileFollowersComponent} from '../com/profile/Prof import {ScreenParams} from '../routes' import {useStores} from '../../state' -export const ProfileFollowers = ({visible, params}: ScreenParams) => { +export const ProfileFollowers = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name} = params useEffect(() => { if (visible) { - store.nav.setTitle(`Followers of ${name}`) + store.nav.setTitle(navIdx, `Followers of ${name}`) } }, [store, visible, name]) diff --git a/src/view/screens/ProfileFollows.tsx b/src/view/screens/ProfileFollows.tsx index c075851c6..e54b562e7 100644 --- a/src/view/screens/ProfileFollows.tsx +++ b/src/view/screens/ProfileFollows.tsx @@ -5,13 +5,13 @@ import {ProfileFollows as ProfileFollowsComponent} from '../com/profile/ProfileF import {ScreenParams} from '../routes' import {useStores} from '../../state' -export const ProfileFollows = ({visible, params}: ScreenParams) => { +export const ProfileFollows = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name} = params useEffect(() => { if (visible) { - store.nav.setTitle(`Followed by ${name}`) + store.nav.setTitle(navIdx, `Followed by ${name}`) } }, [store, visible, name]) diff --git a/src/view/screens/ProfileMembers.tsx b/src/view/screens/ProfileMembers.tsx index dd2221091..b4b6c7e50 100644 --- a/src/view/screens/ProfileMembers.tsx +++ b/src/view/screens/ProfileMembers.tsx @@ -5,13 +5,13 @@ import {ProfileMembers as ProfileMembersComponent} from '../com/profile/ProfileM import {ScreenParams} from '../routes' import {useStores} from '../../state' -export const ProfileMembers = ({visible, params}: ScreenParams) => { +export const ProfileMembers = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name} = params useEffect(() => { if (visible) { - store.nav.setTitle(`Members of ${name}`) + store.nav.setTitle(navIdx, `Members of ${name}`) } }, [store, visible, name]) diff --git a/src/view/screens/Search.tsx b/src/view/screens/Search.tsx index 7f3dd966b..71bac4ad7 100644 --- a/src/view/screens/Search.tsx +++ b/src/view/screens/Search.tsx @@ -7,13 +7,13 @@ import {ScreenParams} from '../routes' import {useStores} from '../../state' import {colors} from '../lib/styles' -export const Search = ({visible, params}: ScreenParams) => { +export const Search = ({navIdx, visible, params}: ScreenParams) => { const store = useStores() const {name} = params useEffect(() => { if (visible) { - store.nav.setTitle(`Search`) + store.nav.setTitle(navIdx, `Search`) } }, [store, visible, name]) const onComposePress = () => { diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index a0aec89f3..b7344cf0d 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -8,14 +8,17 @@ import {ViewHeader} from '../com/util/ViewHeader' import {Link} from '../com/util/Link' import {UserAvatar} from '../com/util/UserAvatar' -export const Settings = observer(function Settings({visible}: ScreenParams) { +export const Settings = observer(function Settings({ + navIdx, + visible, +}: ScreenParams) { const store = useStores() useEffect(() => { if (!visible) { return } - store.nav.setTitle('Settings') + store.nav.setTitle(navIdx, 'Settings') }, [visible, store]) const onPressSignout = () => { |