Fix post list scroll to index offset and more messages position

This commit is contained in:
Elias Nahum 2022-03-22 23:43:26 -03:00
parent 5bfc815f78
commit 077d5b9e95
No known key found for this signature in database
GPG key ID: E038DB71E0B61702
2 changed files with 3 additions and 3 deletions

View file

@ -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
});
}, []);

View file

@ -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;