about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/view/com/modals/ChangeEmail.tsx4
-rw-r--r--src/view/com/modals/LinkWarning.tsx4
-rw-r--r--src/view/com/modals/ListAddRemoveUsers.tsx4
-rw-r--r--src/view/com/modals/ModerationDetails.tsx7
-rw-r--r--src/view/com/modals/VerifyEmail.tsx4
-rw-r--r--src/view/com/pager/PagerWithHeader.tsx2
-rw-r--r--src/view/screens/Profile.tsx30
7 files changed, 40 insertions, 15 deletions
diff --git a/src/view/com/modals/ChangeEmail.tsx b/src/view/com/modals/ChangeEmail.tsx
index 7ea179688..73ab33dd4 100644
--- a/src/view/com/modals/ChangeEmail.tsx
+++ b/src/view/com/modals/ChangeEmail.tsx
@@ -212,7 +212,9 @@ export function Component() {
               <Button
                 testID="cancelBtn"
                 type="default"
-                onPress={() => closeModal()}
+                onPress={() => {
+                  closeModal()
+                }}
                 accessibilityLabel={_(msg`Cancel`)}
                 accessibilityHint=""
                 label={_(msg`Cancel`)}
diff --git a/src/view/com/modals/LinkWarning.tsx b/src/view/com/modals/LinkWarning.tsx
index c63bc2a87..39e6cc3e6 100644
--- a/src/view/com/modals/LinkWarning.tsx
+++ b/src/view/com/modals/LinkWarning.tsx
@@ -79,7 +79,9 @@ export function Component({text, href}: {text: string; href: string}) {
           <Button
             testID="cancelBtn"
             type="default"
-            onPress={() => closeModal()}
+            onPress={() => {
+              closeModal()
+            }}
             accessibilityLabel={_(msg`Cancel`)}
             accessibilityHint=""
             label="Cancel"
diff --git a/src/view/com/modals/ListAddRemoveUsers.tsx b/src/view/com/modals/ListAddRemoveUsers.tsx
index d34194c41..14e16d6bf 100644
--- a/src/view/com/modals/ListAddRemoveUsers.tsx
+++ b/src/view/com/modals/ListAddRemoveUsers.tsx
@@ -136,7 +136,9 @@ export function Component({
           <Button
             testID="doneBtn"
             type="default"
-            onPress={() => closeModal()}
+            onPress={() => {
+              closeModal()
+            }}
             accessibilityLabel={_(msg`Done`)}
             accessibilityHint=""
             label="Done"
diff --git a/src/view/com/modals/ModerationDetails.tsx b/src/view/com/modals/ModerationDetails.tsx
index 35ddfe2a1..c117023d4 100644
--- a/src/view/com/modals/ModerationDetails.tsx
+++ b/src/view/com/modals/ModerationDetails.tsx
@@ -99,7 +99,12 @@ export function Component({
         {description}
       </Text>
       <View style={s.flex1} />
-      <Button type="primary" style={styles.btn} onPress={() => closeModal()}>
+      <Button
+        type="primary"
+        style={styles.btn}
+        onPress={() => {
+          closeModal()
+        }}>
         <Text type="button-lg" style={[pal.textLight, s.textCenter, s.white]}>
           Okay
         </Text>
diff --git a/src/view/com/modals/VerifyEmail.tsx b/src/view/com/modals/VerifyEmail.tsx
index 0af02db4b..4376a3e45 100644
--- a/src/view/com/modals/VerifyEmail.tsx
+++ b/src/view/com/modals/VerifyEmail.tsx
@@ -224,7 +224,9 @@ export function Component({showReminder}: {showReminder?: boolean}) {
               <Button
                 testID="cancelBtn"
                 type="default"
-                onPress={() => closeModal()}
+                onPress={() => {
+                  closeModal()
+                }}
                 accessibilityLabel={
                   stage === Stages.Reminder ? 'Not right now' : 'Cancel'
                 }
diff --git a/src/view/com/pager/PagerWithHeader.tsx b/src/view/com/pager/PagerWithHeader.tsx
index cb9b780a8..3d2a3c55f 100644
--- a/src/view/com/pager/PagerWithHeader.tsx
+++ b/src/view/com/pager/PagerWithHeader.tsx
@@ -22,7 +22,7 @@ import {OnScrollHandler} from 'lib/hooks/useOnMainScroll'
 
 const SCROLLED_DOWN_LIMIT = 200
 
-interface PagerWithHeaderChildParams {
+export interface PagerWithHeaderChildParams {
   headerHeight: number
   isFocused: boolean
   onScroll: OnScrollHandler
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index ce59b7260..30c30d438 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -7,7 +7,7 @@ import {useLingui} from '@lingui/react'
 import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types'
 import {withAuthRequired} from 'view/com/auth/withAuthRequired'
 import {ViewSelectorHandle} from '../com/util/ViewSelector'
-import {CenteredView} from '../com/util/Views'
+import {CenteredView, FlatList} from '../com/util/Views'
 import {ScreenHider} from 'view/com/util/moderation/ScreenHider'
 import {Feed} from 'view/com/posts/Feed'
 import {ProfileLists} from '../com/lists/ProfileLists'
@@ -193,7 +193,7 @@ function ProfileScreenLoaded({
   }, [openComposer, currentAccount, track, profile])
 
   const onPageSelected = React.useCallback(
-    i => {
+    (i: number) => {
       setCurrentPage(i)
     },
     [setCurrentPage],
@@ -231,7 +231,9 @@ function ProfileScreenLoaded({
             headerHeight={headerHeight}
             isFocused={isFocused}
             isScrolledDown={isScrolledDown}
-            scrollElRef={scrollElRef}
+            scrollElRef={
+              scrollElRef as React.MutableRefObject<FlatList<any> | null>
+            }
           />
         )}
         {({onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}) => (
@@ -242,7 +244,9 @@ function ProfileScreenLoaded({
             headerHeight={headerHeight}
             isFocused={isFocused}
             isScrolledDown={isScrolledDown}
-            scrollElRef={scrollElRef}
+            scrollElRef={
+              scrollElRef as React.MutableRefObject<FlatList<any> | null>
+            }
           />
         )}
         {({onScroll, headerHeight, isFocused, isScrolledDown, scrollElRef}) => (
@@ -253,7 +257,9 @@ function ProfileScreenLoaded({
             headerHeight={headerHeight}
             isFocused={isFocused}
             isScrolledDown={isScrolledDown}
-            scrollElRef={scrollElRef}
+            scrollElRef={
+              scrollElRef as React.MutableRefObject<FlatList<any> | null>
+            }
           />
         )}
         {showLikesTab
@@ -271,7 +277,9 @@ function ProfileScreenLoaded({
                 headerHeight={headerHeight}
                 isFocused={isFocused}
                 isScrolledDown={isScrolledDown}
-                scrollElRef={scrollElRef}
+                scrollElRef={
+                  scrollElRef as React.MutableRefObject<FlatList<any> | null>
+                }
               />
             )
           : null}
@@ -279,7 +287,9 @@ function ProfileScreenLoaded({
           ? ({onScroll, headerHeight, isFocused, scrollElRef}) => (
               <ProfileFeedgens
                 did={profile.did}
-                scrollElRef={scrollElRef}
+                scrollElRef={
+                  scrollElRef as React.MutableRefObject<FlatList<any> | null>
+                }
                 onScroll={onScroll}
                 scrollEventThrottle={1}
                 headerOffset={headerHeight}
@@ -291,7 +301,9 @@ function ProfileScreenLoaded({
           ? ({onScroll, headerHeight, isFocused, scrollElRef}) => (
               <ProfileLists
                 did={profile.did}
-                scrollElRef={scrollElRef}
+                scrollElRef={
+                  scrollElRef as React.MutableRefObject<FlatList<any> | null>
+                }
                 onScroll={onScroll}
                 scrollEventThrottle={1}
                 headerOffset={headerHeight}
@@ -318,7 +330,7 @@ interface FeedSectionProps {
   headerHeight: number
   isFocused: boolean
   isScrolledDown: boolean
-  scrollElRef: any /* TODO */
+  scrollElRef: React.MutableRefObject<FlatList<any> | null>
 }
 const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>(
   function FeedSectionImpl(