diff options
author | Ollie H <renahlee@outlook.com> | 2023-05-17 09:37:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 09:37:54 -0700 |
commit | 0ca096138a690f036828c49f9e95cf394b1a4339 (patch) | |
tree | 2f31fb4a2c86ee12feae7f449a67a28aeae47e34 /src | |
parent | 562faa76cce6e935295f30359cbd7180b912cec1 (diff) | |
parent | d6ca8e918af213959791bec3e9daf976c65c1be1 (diff) | |
download | voidsky-0ca096138a690f036828c49f9e95cf394b1a4339.tar.zst |
Merge pull request #692 from bluesky-social/ollie/unread-notifications
Update hint for notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/view/shell/Drawer.tsx | 6 | ||||
-rw-r--r-- | src/view/shell/bottom-bar/BottomBar.tsx | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx index d595bc524..2ecdbaab2 100644 --- a/src/view/shell/Drawer.tsx +++ b/src/view/shell/Drawer.tsx @@ -222,7 +222,11 @@ export const DrawerContent = observer(() => { } label="Notifications" accessibilityLabel="Notifications" - accessibilityHint={`${store.me.notifications.unreadCountLabel} unread`} + accessibilityHint={ + notifications.unreadCountLabel === '' + ? '' + : `${notifications.unreadCountLabel} unread` + } count={notifications.unreadCountLabel} bold={isAtNotifications} onPress={onPressNotifications} diff --git a/src/view/shell/bottom-bar/BottomBar.tsx b/src/view/shell/bottom-bar/BottomBar.tsx index c11a0128c..ef9499f9f 100644 --- a/src/view/shell/bottom-bar/BottomBar.tsx +++ b/src/view/shell/bottom-bar/BottomBar.tsx @@ -38,6 +38,7 @@ export const BottomBar = observer(({navigation}: BottomTabBarProps) => { useNavigationTabState() const {footerMinimalShellTransform} = useMinimalShellMode() + const {notifications} = store.me const onPressTab = React.useCallback( (tab: string) => { @@ -138,11 +139,15 @@ export const BottomBar = observer(({navigation}: BottomTabBarProps) => { ) } onPress={onPressNotifications} - notificationCount={store.me.notifications.unreadCountLabel} + notificationCount={notifications.unreadCountLabel} accessible={true} accessibilityRole="tab" accessibilityLabel="Notifications" - accessibilityHint={`${store.me.notifications.unreadCountLabel} unread`} + accessibilityHint={ + notifications.unreadCountLabel === '' + ? '' + : `${notifications.unreadCountLabel} unread` + } /> <Btn testID="bottomBarProfileBtn" |