From 620ab887132855d447f0a328bf58989c8f3f3328 Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Mon, 10 Jun 2024 18:17:26 +0200
Subject: [PATCH] Ungate mobile web notification badge (#4459)

---
 src/lib/statsig/gates.ts                   |  1 -
 src/view/shell/bottom-bar/BottomBarWeb.tsx | 32 ++++++++++------------
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts
index 96be12c2..4481935f 100644
--- a/src/lib/statsig/gates.ts
+++ b/src/lib/statsig/gates.ts
@@ -3,4 +3,3 @@ export type Gate =
   | 'request_notifications_permission_after_onboarding_v2'
   | 'show_avi_follow_button'
   | 'show_follow_back_label_v2'
-  | 'show_notification_badge_mobile_web'
diff --git a/src/view/shell/bottom-bar/BottomBarWeb.tsx b/src/view/shell/bottom-bar/BottomBarWeb.tsx
index ff52af07..21c253ee 100644
--- a/src/view/shell/bottom-bar/BottomBarWeb.tsx
+++ b/src/view/shell/bottom-bar/BottomBarWeb.tsx
@@ -16,7 +16,6 @@ import {s} from '#/lib/styles'
 import {useSession} from '#/state/session'
 import {useLoggedOutViewControls} from '#/state/shell/logged-out'
 import {useCloseAllActiveElements} from '#/state/util'
-import {useGate} from 'lib/statsig/statsig'
 import {useUnreadMessageCount} from 'state/queries/messages/list-converations'
 import {useUnreadNotifications} from 'state/queries/notifications/unread'
 import {Button} from '#/view/com/util/forms/Button'
@@ -49,7 +48,6 @@ export function BottomBarWeb() {
   const {hasSession, currentAccount} = useSession()
   const pal = usePalette('default')
   const safeAreaInsets = useSafeAreaInsets()
-  const gate = useGate()
   const footerMinimalShellTransform = useMinimalShellFooterTransform()
   const {requestSwitchToAccount} = useLoggedOutViewControls()
   const closeAllActiveElements = useCloseAllActiveElements()
@@ -115,14 +113,13 @@ export function BottomBarWeb() {
                         width={iconWidth - 1}
                         style={[styles.ctrlIcon, pal.text, styles.messagesIcon]}
                       />
-                      {unreadMessageCount.count > 0 &&
-                        gate('show_notification_badge_mobile_web') && (
-                          <View style={styles.notificationCount}>
-                            <Text style={styles.notificationCountLabel}>
-                              {unreadMessageCount.numUnread}
-                            </Text>
-                          </View>
-                        )}
+                      {unreadMessageCount.count > 0 && (
+                        <View style={styles.notificationCount}>
+                          <Text style={styles.notificationCountLabel}>
+                            {unreadMessageCount.numUnread}
+                          </Text>
+                        </View>
+                      )}
                     </>
                   )
                 }}
@@ -136,14 +133,13 @@ export function BottomBarWeb() {
                         width={iconWidth}
                         style={[styles.ctrlIcon, pal.text, styles.bellIcon]}
                       />
-                      {notificationCountStr !== '' &&
-                        gate('show_notification_badge_mobile_web') && (
-                          <View style={styles.notificationCount}>
-                            <Text style={styles.notificationCountLabel}>
-                              {notificationCountStr}
-                            </Text>
-                          </View>
-                        )}
+                      {notificationCountStr !== '' && (
+                        <View style={styles.notificationCount}>
+                          <Text style={styles.notificationCountLabel}>
+                            {notificationCountStr}
+                          </Text>
+                        </View>
+                      )}
                     </>
                   )
                 }}