diff --git a/src/state/models/navigation.ts b/src/state/models/navigation.ts
index 096f353357..553a897d42 100644
--- a/src/state/models/navigation.ts
+++ b/src/state/models/navigation.ts
@@ -179,6 +179,10 @@ export class NavigationModel {
return this.tabs[this.tabIndex]
}
+ get tabCount() {
+ return this.tabs.length
+ }
+
isCurrentScreen(tabId: number, index: number) {
return this.tab.id === tabId && this.tab.index === index
}
diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx
index 3067f3976d..3fadee5e05 100644
--- a/src/view/shell/mobile/index.tsx
+++ b/src/view/shell/mobile/index.tsx
@@ -51,8 +51,8 @@ const SWIPE_GESTURE_VEL_TRIGGER = 2500
const Btn = ({
icon,
- inactive,
notificationCount,
+ tabCount,
onPress,
onLongPress,
}: {
@@ -66,8 +66,8 @@ const Btn = ({
| 'bell-solid'
| 'search'
| 'search-solid'
- inactive?: boolean
notificationCount?: number
+ tabCount?: number
onPress?: (event: GestureResponderEvent) => void
onLongPress?: (event: GestureResponderEvent) => void
}) => {
@@ -104,22 +104,6 @@ const Btn = ({
IconEl = FontAwesomeIcon
}
- if (inactive) {
- return (
-
- {notificationCount ? (
-
- {notificationCount}
-
- ) : undefined}
-
-
- )
- }
return (
{notificationCount ? (
-
- {notificationCount}
+
+ {notificationCount}
+
+ ) : undefined}
+ {tabCount > 1 ? (
+
+ {tabCount}
) : undefined}
@@ -299,8 +288,9 @@ export const MobileShell: React.FC = observer(() => {
onPress={onPressSearch}
/>
{
notificationCount={store.me.notificationCount}
/>