Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Include tab count and move btn to center

+30 -26
+4
src/state/models/navigation.ts
··· 179 179 return this.tabs[this.tabIndex] 180 180 } 181 181 182 + get tabCount() { 183 + return this.tabs.length 184 + } 185 + 182 186 isCurrentScreen(tabId: number, index: number) { 183 187 return this.tab.id === tabId && this.tab.index === index 184 188 }
+26 -26
src/view/shell/mobile/index.tsx
··· 51 51 52 52 const Btn = ({ 53 53 icon, 54 - inactive, 55 54 notificationCount, 55 + tabCount, 56 56 onPress, 57 57 onLongPress, 58 58 }: { ··· 66 66 | 'bell-solid' 67 67 | 'search' 68 68 | 'search-solid' 69 - inactive?: boolean 70 69 notificationCount?: number 70 + tabCount?: number 71 71 onPress?: (event: GestureResponderEvent) => void 72 72 onLongPress?: (event: GestureResponderEvent) => void 73 73 }) => { ··· 104 104 IconEl = FontAwesomeIcon 105 105 } 106 106 107 - if (inactive) { 108 - return ( 109 - <View style={styles.ctrl}> 110 - {notificationCount ? ( 111 - <View style={styles.ctrlCount}> 112 - <Text style={styles.ctrlCountLabel}>{notificationCount}</Text> 113 - </View> 114 - ) : undefined} 115 - <IconEl 116 - size={size} 117 - style={[styles.ctrlIcon, styles.inactive, addedStyles]} 118 - icon={icon} 119 - /> 120 - </View> 121 - ) 122 - } 123 107 return ( 124 108 <TouchableOpacity 125 109 style={styles.ctrl} ··· 127 111 onPressIn={onLongPress ? undefined : onPress} 128 112 onLongPress={onLongPress}> 129 113 {notificationCount ? ( 130 - <View style={styles.ctrlCount}> 131 - <Text style={styles.ctrlCountLabel}>{notificationCount}</Text> 114 + <View style={styles.notificationCount}> 115 + <Text style={styles.notificationCountLabel}>{notificationCount}</Text> 116 + </View> 117 + ) : undefined} 118 + {tabCount > 1 ? ( 119 + <View style={styles.tabCount}> 120 + <Text style={styles.tabCountLabel}>{tabCount}</Text> 132 121 </View> 133 122 ) : undefined} 134 123 <IconEl size={size} style={[styles.ctrlIcon, addedStyles]} icon={icon} /> ··· 299 288 onPress={onPressSearch} 300 289 /> 301 290 <Btn 302 - icon={isMainMenuActive ? 'menu-solid' : 'menu'} 303 - onPress={onPressMenu} 291 + icon={isTabsSelectorActive ? 'clone' : ['far', 'clone']} 292 + onPress={onPressTabs} 293 + tabCount={store.nav.tabCount} 304 294 /> 305 295 <Btn 306 296 icon={isAtNotifications ? 'bell-solid' : 'bell'} ··· 308 298 notificationCount={store.me.notificationCount} 309 299 /> 310 300 <Btn 311 - icon={isTabsSelectorActive ? 'clone' : ['far', 'clone']} 312 - onPress={onPressTabs} 301 + icon={isMainMenuActive ? 'menu-solid' : 'menu'} 302 + onPress={onPressMenu} 313 303 /> 314 304 </SafeAreaView> 315 305 <MainMenu ··· 457 447 paddingTop: 15, 458 448 paddingBottom: 15, 459 449 }, 460 - ctrlCount: { 450 + notificationCount: { 461 451 position: 'absolute', 462 452 left: 46, 463 453 top: 10, ··· 466 456 paddingBottom: 1, 467 457 borderRadius: 8, 468 458 }, 469 - ctrlCountLabel: { 459 + notificationCountLabel: { 470 460 fontSize: 12, 471 461 fontWeight: 'bold', 472 462 color: colors.white, 463 + }, 464 + tabCount: { 465 + position: 'absolute', 466 + left: 46, 467 + top: 30, 468 + }, 469 + tabCountLabel: { 470 + fontSize: 12, 471 + fontWeight: 'bold', 472 + color: colors.black, 473 473 }, 474 474 ctrlIcon: { 475 475 color: colors.black,