diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-07-07 12:00:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 12:00:17 -0500 |
commit | 237e957d1699fb4da756e9acc98c527f282e90b0 (patch) | |
tree | e1bcfceccbb0747b3e234407c9a3612d010ccaaa /src/view/com/profile/ProfileHeader.tsx | |
parent | d8aded7b15ba6a59750ec877fae63fa2a64afe4c (diff) | |
download | voidsky-237e957d1699fb4da756e9acc98c527f282e90b0.tar.zst |
Fixes and improvements to the Profile Preview modal (#992)
* Fix: use more reliable navigation method * Fix: show lightbox over the active modal * Fix: close the profile preview on navigation * Factor out UserPreviewLink and add preview behavior to notifications * Fix postmeta overflow on web * Fix lint
Diffstat (limited to 'src/view/com/profile/ProfileHeader.tsx')
-rw-r--r-- | src/view/com/profile/ProfileHeader.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/view/com/profile/ProfileHeader.tsx b/src/view/com/profile/ProfileHeader.tsx index 46ff3d979..56814fe97 100644 --- a/src/view/com/profile/ProfileHeader.tsx +++ b/src/view/com/profile/ProfileHeader.tsx @@ -33,6 +33,7 @@ import {isDesktopWeb, isNative} from 'platform/detection' import {FollowState} from 'state/models/cache/my-follows' import {shareUrl} from 'lib/sharing' import {formatCount} from '../util/numeric/format' +import {navigate} from '../../../Navigation' const BACK_HITSLOP = {left: 30, top: 30, right: 30, bottom: 30} @@ -143,13 +144,15 @@ const ProfileHeaderLoaded = observer( const onPressFollowers = React.useCallback(() => { track('ProfileHeader:FollowersButtonClicked') - navigation.push('ProfileFollowers', {name: view.handle}) - }, [track, navigation, view]) + navigate('ProfileFollowers', {name: view.handle}) + store.shell.closeAllActiveElements() // for when used in the profile preview modal + }, [track, view, store.shell]) const onPressFollows = React.useCallback(() => { track('ProfileHeader:FollowsButtonClicked') - navigation.push('ProfileFollows', {name: view.handle}) - }, [track, navigation, view]) + navigate('ProfileFollows', {name: view.handle}) + store.shell.closeAllActiveElements() // for when used in the profile preview modal + }, [track, view, store.shell]) const onPressShare = React.useCallback(() => { track('ProfileHeader:ShareButtonClicked') |