diff --git a/app/views/RoomView/List/RefreshControl.tsx b/app/views/RoomView/List/RefreshControl.tsx deleted file mode 100644 index 3dfefa1ea..000000000 --- a/app/views/RoomView/List/RefreshControl.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import React from 'react'; -import { RefreshControl as RefreshControlRN, RefreshControlProps } from 'react-native'; - -import { useTheme } from '../../../theme'; - -type TRefreshControlProps = Pick; - -export const RefreshControl = ({ refreshing, onRefresh }: TRefreshControlProps): React.ReactElement => { - const { colors } = useTheme(); - return ; -}; diff --git a/app/views/RoomView/List/index.tsx b/app/views/RoomView/List/index.tsx index 0252c1012..2369c6ff7 100644 --- a/app/views/RoomView/List/index.tsx +++ b/app/views/RoomView/List/index.tsx @@ -2,7 +2,7 @@ import { Q } from '@nozbe/watermelondb'; import { dequal } from 'dequal'; import moment from 'moment'; import React from 'react'; -import { FlatListProps, ViewToken } from 'react-native'; +import { FlatListProps, ViewToken, RefreshControl } from 'react-native'; import { event, Value } from 'react-native-reanimated'; import { Observable, Subscription } from 'rxjs'; @@ -18,9 +18,9 @@ import List, { IListProps, TListRef } from './List'; import NavBottomFAB from './NavBottomFAB'; import { loadMissedMessages, loadThreadMessages } from '../../../lib/methods'; import { Services } from '../../../lib/services'; -import { MESSAGE_TYPE_ANY_LOAD } from '../../../lib/constants'; +import { MESSAGE_TYPE_ANY_LOAD, themes } from '../../../lib/constants'; import { TMessage } from '../definitions'; -import { RefreshControl } from './RefreshControl'; +import { ThemeContext } from '../../../theme'; const QUERY_SIZE = 50; @@ -341,26 +341,33 @@ class ListContainer extends React.Component - - } - /> - - + // FIXME: added context directly so we don't have to touch on withTheme's ref + + {({ theme }) => ( + <> + + + } + /> + + + )} + ); } }