diff options
author | renahlee <renahlee@outlook.com> | 2023-05-16 22:31:59 -0700 |
---|---|---|
committer | renahlee <renahlee@outlook.com> | 2023-05-17 09:12:09 -0700 |
commit | f7f0db65d36506d1e32c3d349e4505136180afb0 (patch) | |
tree | cead555a42e7731795beb5191473be0e49f18e54 | |
parent | 562faa76cce6e935295f30359cbd7180b912cec1 (diff) | |
download | voidsky-f7f0db65d36506d1e32c3d349e4505136180afb0.tar.zst |
Update hint for notifications
-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..89e30002e 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 === '' + ? 'No new notifications' + : `${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..b057964c6 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 === '' + ? 'No new notifications' + : `${notifications.unreadCountLabel} unread` + } /> <Btn testID="bottomBarProfileBtn" |