Skip to content

Commit 49f8e50

Browse files
authored
Fix labeller highlight when selected on bottom bar (bluesky-social#10716)
1 parent 9f200aa commit 49f8e50

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

src/view/shell/bottom-bar/BottomBar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ export function BottomBar({navigation}: BottomTabBarProps) {
144144

145145
const [demoMode] = useDemoMode()
146146
const {isActive: live} = useActorStatus(profile)
147+
const isLabeler = profile?.associated?.labeler
147148

148149
return (
149150
<>
@@ -276,9 +277,9 @@ export function BottomBar({navigation}: BottomTabBarProps) {
276277
<View
277278
style={[
278279
styles.ctrlIcon,
279-
styles.profileIcon,
280+
isLabeler ? styles.profileIconSquare : styles.profileIcon,
280281
isAtMyProfile && [
281-
styles.onProfile,
282+
isLabeler ? styles.onProfileSquare : styles.onProfile,
282283
{
283284
borderColor: t.atoms.text.color,
284285
borderWidth: live ? 0 : 1,

src/view/shell/bottom-bar/BottomBarStyles.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,18 @@ export const styles = StyleSheet.create({
6767
borderWidth: 1,
6868
borderColor: 'transparent',
6969
},
70+
profileIconSquare: {
71+
borderRadius: 3,
72+
borderWidth: 1,
73+
borderColor: 'transparent',
74+
},
7075
messagesIcon: {},
7176
onProfile: {
7277
borderWidth: 1,
7378
borderRadius: 100,
7479
},
80+
onProfileSquare: {
81+
borderWidth: 1,
82+
borderRadius: 3,
83+
},
7584
})

src/view/shell/bottom-bar/BottomBarWeb.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export function BottomBarWeb() {
6565
const unreadMessageCount = useUnreadMessageCount()
6666
const notificationCountStr = useUnreadNotifications()
6767
const aa = useAgeAssurance()
68+
const isLabeler = profile?.associated?.labeler
6869

6970
const showSignIn = useCallback(() => {
7071
closeAllActiveElements()
@@ -186,9 +187,13 @@ export function BottomBarWeb() {
186187
<View
187188
style={[
188189
styles.ctrlIcon,
189-
styles.profileIcon,
190+
isLabeler
191+
? styles.profileIconSquare
192+
: styles.profileIcon,
190193
isActive && [
191-
styles.onProfile,
194+
isLabeler
195+
? styles.onProfileSquare
196+
: styles.onProfile,
192197
{borderColor: t.atoms.text.color},
193198
],
194199
]}>

0 commit comments

Comments
 (0)