File tree Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Expand file tree Collapse file tree 3 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ const Bubble = <TMessage extends IMessage = IMessage>(props: BubbleProps<TMessag
66
66
67
67
// eslint-disable-next-line @typescript-eslint/no-explicit-any
68
68
; ( context as any ) . actionSheet ( ) . showActionSheetWithOptions (
69
- {
70
- options,
71
- cancelButtonIndex,
72
- } ,
73
- ( buttonIndex : number ) => {
74
- console . log ( 'onLongPress' , { buttonIndex } )
75
- }
76
- )
69
+ {
70
+ options,
71
+ cancelButtonIndex,
72
+ } ,
73
+ ( buttonIndex : number ) => {
74
+ console . log ( 'onLongPress' , { buttonIndex } )
75
+ }
76
+ )
77
77
} , [
78
78
currentMessage ,
79
79
context ,
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ import { isSameDay } from '../utils'
27
27
28
28
export * from './types'
29
29
30
- const AnimatedFlatList = Animated . createAnimatedComponent ( FlatList )
30
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
+ const AnimatedFlatList = Animated . createAnimatedComponent ( FlatList ) as React . ComponentType < any >
31
32
32
33
function MessageContainer < TMessage extends IMessage = IMessage > ( props : MessageContainerProps < TMessage > ) {
33
34
const {
@@ -350,7 +351,7 @@ function MessageContainer<TMessage extends IMessage = IMessage> (props: MessageC
350
351
>
351
352
< AnimatedFlatList
352
353
extraData = { extraData }
353
- ref = { forwardRef as React . Ref < FlatList < unknown > > }
354
+ ref = { forwardRef }
354
355
keyExtractor = { keyExtractor }
355
356
data = { messages }
356
357
renderItem = { renderItem }
Original file line number Diff line number Diff line change 1
- import React , { Component , RefObject } from 'react'
1
+ import React , { RefObject } from 'react'
2
2
import {
3
3
FlatListProps ,
4
4
StyleProp ,
5
5
ViewStyle ,
6
+ FlatList ,
6
7
} from 'react-native'
7
8
8
9
import { LoadEarlierProps } from '../LoadEarlier'
9
10
import { MessageProps } from '../Message'
10
- import { User , IMessage , Reply , DayProps } from '../types'
11
+ import { User , IMessage , Reply , DayProps } from '../types'
11
12
import { ReanimatedScrollEvent } from 'react-native-reanimated/lib/typescript/hook/commonTypes'
12
- import { FlatList } from 'react-native-reanimated/lib/typescript/Animated'
13
- import { AnimateProps } from 'react-native-reanimated'
14
13
15
- export type ListViewProps < TMessage extends IMessage = IMessage > = Partial < FlatListProps < TMessage > > ;
14
+ export type ListViewProps < TMessage extends IMessage = IMessage > = Partial < FlatListProps < TMessage > >
16
15
17
- export type AnimatedList < TMessage > = Component < AnimateProps < FlatListProps < TMessage > > , unknown , unknown > & FlatList < FlatListProps < TMessage > >
16
+ export type AnimatedList < TMessage > = FlatList < TMessage >
18
17
19
18
export interface MessageContainerProps < TMessage extends IMessage = IMessage > {
20
19
forwardRef ?: RefObject < AnimatedList < TMessage > >
You can’t perform that action at this time.
0 commit comments