mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
removed scrollIndex state from redux
This commit is contained in:
parent
3518bfc9e6
commit
445919cbf9
@ -66,7 +66,6 @@ const postsListContainer = (
|
||||
const votesCache = useSelector((state) => state.cache.votesCollection);
|
||||
|
||||
const mutes = useSelector((state) => state.account.currentAccount.mutes);
|
||||
const scrollIndex: number = useSelector(state => state.ui.scrollIndex);
|
||||
|
||||
const scrollPosition = useSelector((state) => {
|
||||
return isFeedScreen ? state.posts.feedScrollPosition : state.posts.otherScrollPosition;
|
||||
@ -258,7 +257,7 @@ const postsListContainer = (
|
||||
maxToRenderPerBatch={5}
|
||||
initialNumToRender={3}
|
||||
windowSize={8}
|
||||
extraData={[imageHeights, scrollIndex, reblogsCollectionRef.current, votesCache]}
|
||||
extraData={[imageHeights, reblogsCollectionRef.current, votesCache]}
|
||||
onEndReached={_onEndReached}
|
||||
onMomentumScrollBegin={() => {
|
||||
_onEndReachedCalledDuringMomentum = false;
|
||||
|
@ -30,7 +30,6 @@ interface UiState {
|
||||
lockedOrientation: string;
|
||||
replyModalVisible: boolean;
|
||||
replyModalPost: any;
|
||||
scrollIndex: number;
|
||||
}
|
||||
|
||||
const initialState: UiState = {
|
||||
@ -47,7 +46,6 @@ const initialState: UiState = {
|
||||
lockedOrientation: orientations.PORTRAIT,
|
||||
replyModalPost: null,
|
||||
replyModalVisible: false,
|
||||
scrollIndex:0
|
||||
};
|
||||
|
||||
export default function (state = initialState, action): UiState {
|
||||
@ -137,13 +135,6 @@ export default function (state = initialState, action): UiState {
|
||||
replyModalVisible: false,
|
||||
replyModalPost: null,
|
||||
};
|
||||
|
||||
//TOOD: remove before PR, only for testing
|
||||
case 'inc-scroll-index':
|
||||
return {
|
||||
...state,
|
||||
scrollIndex:state.scrollIndex + 1
|
||||
}
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user