Skip to content

Commit 51d984e

Browse files
committed
fix: invertedScrollView
1 parent 4837b1a commit 51d984e

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

app/views/RoomView/List/components/InvertedScrollView.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ const COMMAND_SCROLL_TO = 1;
1717
const COMMAND_SCROLL_TO_END = 2;
1818
const COMMAND_FLASH_SCROLL_INDICATORS = 3;
1919

20+
const styles = StyleSheet.create({
21+
baseVertical: {
22+
flexGrow: 1,
23+
flexShrink: 1,
24+
flexDirection: 'column',
25+
overflow: 'scroll'
26+
},
27+
baseHorizontal: {
28+
flexGrow: 1,
29+
flexShrink: 1,
30+
flexDirection: 'row',
31+
overflow: 'scroll'
32+
}
33+
});
34+
35+
2036
type ScrollViewPropsWithRef = ScrollViewProps & React.RefAttributes<NativeScrollInstance | null>;
2137
type NativeScrollInstance = React.ComponentRef<NonNullable<typeof NativeInvertedScrollView>>;
2238
interface IScrollableMethods {
@@ -146,19 +162,4 @@ const InvertedScrollView = forwardRef<InvertedScrollViewRef, ScrollViewProps>((p
146162

147163
InvertedScrollView.displayName = 'InvertedScrollView';
148164

149-
const styles = StyleSheet.create({
150-
baseVertical: {
151-
flexGrow: 1,
152-
flexShrink: 1,
153-
flexDirection: 'column',
154-
overflow: 'scroll'
155-
},
156-
baseHorizontal: {
157-
flexGrow: 1,
158-
flexShrink: 1,
159-
flexDirection: 'row',
160-
overflow: 'scroll'
161-
}
162-
});
163-
164165
export default InvertedScrollView;

0 commit comments

Comments
 (0)