about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorrenahlee <renahlee@outlook.com>2023-05-16 22:31:59 -0700
committerrenahlee <renahlee@outlook.com>2023-05-17 09:12:09 -0700
commitf7f0db65d36506d1e32c3d349e4505136180afb0 (patch)
treecead555a42e7731795beb5191473be0e49f18e54 /src
parent562faa76cce6e935295f30359cbd7180b912cec1 (diff)
downloadvoidsky-f7f0db65d36506d1e32c3d349e4505136180afb0.tar.zst
Update hint for notifications
Diffstat (limited to 'src')
-rw-r--r--src/view/shell/Drawer.tsx6
-rw-r--r--src/view/shell/bottom-bar/BottomBar.tsx9
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"