From 077d5b9e958a8489bf21aa807838b3c3ce74225c Mon Sep 17 00:00:00 2001 From: Elias Nahum Date: Tue, 22 Mar 2022 23:43:26 -0300 Subject: [PATCH] Fix post list scroll to index offset and more messages position --- app/components/post_list/index.tsx | 2 +- app/components/post_list/more_messages/more_messages.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/post_list/index.tsx b/app/components/post_list/index.tsx index 9109c8646..a92a3d867 100644 --- a/app/components/post_list/index.tsx +++ b/app/components/post_list/index.tsx @@ -317,7 +317,7 @@ const PostList = ({ listRef.current?.scrollToIndex({ animated, index, - viewOffset: 0, + viewOffset: Platform.select({ios: -45, default: 0}), viewPosition: 1, // 0 is at bottom }); }, []); diff --git a/app/components/post_list/more_messages/more_messages.tsx b/app/components/post_list/more_messages/more_messages.tsx index 14cbf4b26..eca27f5f2 100644 --- a/app/components/post_list/more_messages/more_messages.tsx +++ b/app/components/post_list/more_messages/more_messages.tsx @@ -2,7 +2,7 @@ // See LICENSE.txt for license information. import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {ActivityIndicator, DeviceEventEmitter, View, ViewToken} from 'react-native'; +import {ActivityIndicator, DeviceEventEmitter, Platform, View, ViewToken} from 'react-native'; import Animated, {interpolate, useAnimatedStyle, useSharedValue, withSpring} from 'react-native-reanimated'; import {resetMessageCount} from '@actions/local/channel'; @@ -30,7 +30,7 @@ type Props = { } const HIDDEN_TOP = -60; -const SHOWN_TOP = 0; +const SHOWN_TOP = Platform.select({ios: 40, default: 0}); const MIN_INPUT = 0; const MAX_INPUT = 1;