Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Fix some type errors (#1952)

* Fix some low-hanging type errors

* Override scrollRef types on profile

authored by

Eric Bailey and committed by
GitHub
9c8a1b8a 6c8f043e

+40 -15
+3 -1
src/view/com/modals/ChangeEmail.tsx
··· 212 212 <Button 213 213 testID="cancelBtn" 214 214 type="default" 215 - onPress={() => closeModal()} 215 + onPress={() => { 216 + closeModal() 217 + }} 216 218 accessibilityLabel={_(msg`Cancel`)} 217 219 accessibilityHint="" 218 220 label={_(msg`Cancel`)}
+3 -1
src/view/com/modals/LinkWarning.tsx
··· 79 79 <Button 80 80 testID="cancelBtn" 81 81 type="default" 82 - onPress={() => closeModal()} 82 + onPress={() => { 83 + closeModal() 84 + }} 83 85 accessibilityLabel={_(msg`Cancel`)} 84 86 accessibilityHint="" 85 87 label="Cancel"
+3 -1
src/view/com/modals/ListAddRemoveUsers.tsx
··· 136 136 <Button 137 137 testID="doneBtn" 138 138 type="default" 139 - onPress={() => closeModal()} 139 + onPress={() => { 140 + closeModal() 141 + }} 140 142 accessibilityLabel={_(msg`Done`)} 141 143 accessibilityHint="" 142 144 label="Done"
+6 -1
src/view/com/modals/ModerationDetails.tsx
··· 99 99 {description} 100 100 </Text> 101 101 <View style={s.flex1} /> 102 - <Button type="primary" style={styles.btn} onPress={() => closeModal()}> 102 + <Button 103 + type="primary" 104 + style={styles.btn} 105 + onPress={() => { 106 + closeModal() 107 + }}> 103 108 <Text type="button-lg" style={[pal.textLight, s.textCenter, s.white]}> 104 109 Okay 105 110 </Text>
+3 -1
src/view/com/modals/VerifyEmail.tsx
··· 224 224 <Button 225 225 testID="cancelBtn" 226 226 type="default" 227 - onPress={() => closeModal()} 227 + onPress={() => { 228 + closeModal() 229 + }} 228 230 accessibilityLabel={ 229 231 stage === Stages.Reminder ? 'Not right now' : 'Cancel' 230 232 }
+1 -1
src/view/com/pager/PagerWithHeader.tsx
··· 22 22 23 23 const SCROLLED_DOWN_LIMIT = 200 24 24 25 - interface PagerWithHeaderChildParams { 25 + export interface PagerWithHeaderChildParams { 26 26 headerHeight: number 27 27 isFocused: boolean 28 28 onScroll: OnScrollHandler
+21 -9
src/view/screens/Profile.tsx
··· 7 7 import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' 8 8 import {withAuthRequired} from 'view/com/auth/withAuthRequired' 9 9 import {ViewSelectorHandle} from '../com/util/ViewSelector' 10 - import {CenteredView} from '../com/util/Views' 10 + import {CenteredView, FlatList} from '../com/util/Views' 11 11 import {ScreenHider} from 'view/com/util/moderation/ScreenHider' 12 12 import {Feed} from 'view/com/posts/Feed' 13 13 import {ProfileLists} from '../com/lists/ProfileLists' ··· 193 193 }, [openComposer, currentAccount, track, profile]) 194 194 195 195 const onPageSelected = React.useCallback( 196 - i => { 196 + (i: number) => { 197 197 setCurrentPage(i) 198 198 }, 199 199 [setCurrentPage], ··· 231 231 headerHeight={headerHeight} 232 232 isFocused={isFocused} 233 233 isScrolledDown={isScrolledDown} 234 - scrollElRef={scrollElRef} 234 + scrollElRef={ 235 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 236 + } 235 237 /> 236 238 )} 237 239 {({onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}) => ( ··· 242 244 headerHeight={headerHeight} 243 245 isFocused={isFocused} 244 246 isScrolledDown={isScrolledDown} 245 - scrollElRef={scrollElRef} 247 + scrollElRef={ 248 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 249 + } 246 250 /> 247 251 )} 248 252 {({onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}) => ( ··· 253 257 headerHeight={headerHeight} 254 258 isFocused={isFocused} 255 259 isScrolledDown={isScrolledDown} 256 - scrollElRef={scrollElRef} 260 + scrollElRef={ 261 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 262 + } 257 263 /> 258 264 )} 259 265 {showLikesTab ··· 271 277 headerHeight={headerHeight} 272 278 isFocused={isFocused} 273 279 isScrolledDown={isScrolledDown} 274 - scrollElRef={scrollElRef} 280 + scrollElRef={ 281 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 282 + } 275 283 /> 276 284 ) 277 285 : null} ··· 279 287 ? ({onScroll, headerHeight, isFocused, scrollElRef}) => ( 280 288 <ProfileFeedgens 281 289 did={profile.did} 282 - scrollElRef={scrollElRef} 290 + scrollElRef={ 291 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 292 + } 283 293 onScroll={onScroll} 284 294 scrollEventThrottle={1} 285 295 headerOffset={headerHeight} ··· 291 301 ? ({onScroll, headerHeight, isFocused, scrollElRef}) => ( 292 302 <ProfileLists 293 303 did={profile.did} 294 - scrollElRef={scrollElRef} 304 + scrollElRef={ 305 + scrollElRef as React.MutableRefObject<FlatList<any> | null> 306 + } 295 307 onScroll={onScroll} 296 308 scrollEventThrottle={1} 297 309 headerOffset={headerHeight} ··· 318 330 headerHeight: number 319 331 isFocused: boolean 320 332 isScrolledDown: boolean 321 - scrollElRef: any /* TODO */ 333 + scrollElRef: React.MutableRefObject<FlatList<any> | null> 322 334 } 323 335 const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>( 324 336 function FeedSectionImpl(