about summary refs log tree commit diff
path: root/src/components/Dialog
diff options
context:
space:
mode:
authorSamuel Newman <mozzius@protonmail.com>2024-04-19 23:26:04 +0100
committerGitHub <noreply@github.com>2024-04-19 23:26:04 +0100
commit22e86c99033a55881bf02a3129b653a13bac619e (patch)
treedae74bf3ebefb53f468c29d3ae5ac918566b3963 /src/components/Dialog
parentedbb18afa44bcfee4560ac19880a0c32563b6a0e (diff)
downloadvoidsky-22e86c99033a55881bf02a3129b653a13bac619e.tar.zst
fix onEndReached issue by forcing flatlist to scroll (#3623)
Diffstat (limited to 'src/components/Dialog')
-rw-r--r--src/components/Dialog/index.web.tsx16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx
index d00d2d832..a086955db 100644
--- a/src/components/Dialog/index.web.tsx
+++ b/src/components/Dialog/index.web.tsx
@@ -199,11 +199,23 @@ export const ScrollableInner = Inner
 
 export function InnerFlatList({
   label,
+  style,
   ...props
 }: FlatListProps<any> & {label: string}) {
+  const {gtMobile} = useBreakpoints()
   return (
-    <Inner label={label}>
-      <FlatList {...props} />
+    <Inner
+      label={label}
+      // @ts-ignore web only -sfn
+      style={{
+        paddingHorizontal: 0,
+        maxHeight: 'calc(-36px + 100vh)',
+        overflow: 'hidden',
+      }}>
+      <FlatList
+        style={[gtMobile ? a.px_2xl : a.px_xl, flatten(style)]}
+        {...props}
+      />
     </Inner>
   )
 }