Skip to content

Commit 61333ae

Browse files
committed
Merge branch 'master' into copilot/fix-2613
2 parents 679bdb2 + 7979ba1 commit 61333ae

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/Bubble/index.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ const Bubble = <TMessage extends IMessage = IMessage>(props: BubbleProps<TMessag
6666

6767
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6868
;(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+
)
7777
}, [
7878
currentMessage,
7979
context,

src/MessageContainer/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ import { isSameDay } from '../utils'
2727

2828
export * from './types'
2929

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>
3132

3233
function MessageContainer<TMessage extends IMessage = IMessage> (props: MessageContainerProps<TMessage>) {
3334
const {
@@ -350,7 +351,7 @@ function MessageContainer<TMessage extends IMessage = IMessage> (props: MessageC
350351
>
351352
<AnimatedFlatList
352353
extraData={extraData}
353-
ref={forwardRef as React.Ref<FlatList<unknown>>}
354+
ref={forwardRef}
354355
keyExtractor={keyExtractor}
355356
data={messages}
356357
renderItem={renderItem}

src/MessageContainer/types.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
import React, { Component, RefObject } from 'react'
1+
import React, { RefObject } from 'react'
22
import {
33
FlatListProps,
44
StyleProp,
55
ViewStyle,
6+
FlatList,
67
} from 'react-native'
78

89
import { LoadEarlierProps } from '../LoadEarlier'
910
import { MessageProps } from '../Message'
10-
import {User, IMessage, Reply, DayProps} from '../types'
11+
import { User, IMessage, Reply, DayProps } from '../types'
1112
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'
1413

15-
export type ListViewProps<TMessage extends IMessage = IMessage> = Partial<FlatListProps<TMessage>>;
14+
export type ListViewProps<TMessage extends IMessage = IMessage> = Partial<FlatListProps<TMessage>>
1615

17-
export type AnimatedList<TMessage> = Component<AnimateProps<FlatListProps<TMessage>>, unknown, unknown> & FlatList<FlatListProps<TMessage>>
16+
export type AnimatedList<TMessage> = FlatList<TMessage>
1817

1918
export interface MessageContainerProps<TMessage extends IMessage = IMessage> {
2019
forwardRef?: RefObject<AnimatedList<TMessage>>

0 commit comments

Comments
 (0)