Disable layout animation

This commit is contained in:
Diego Mello 2022-11-29 16:30:09 -03:00
parent 4aeda3f778
commit d42f623a2f
2 changed files with 11 additions and 11 deletions

View File

@ -10,7 +10,7 @@ import ActivityIndicator from '../../../containers/ActivityIndicator';
import { MessageType, TAnyMessage, TMessageModel, TThreadMessageModel, TThreadModel } from '../../../definitions';
import database from '../../../lib/database';
import { compareServerVersion, debounce } from '../../../lib/methods/helpers';
import { animateNextTransition } from '../../../lib/methods/helpers/layoutAnimation';
// import { animateNextTransition } from '../../../lib/methods/helpers/layoutAnimation';
import log from '../../../lib/methods/helpers/log';
import EmptyRoom from '../EmptyRoom';
// @ts-ignore
@ -148,7 +148,7 @@ class ListContainer extends React.Component<IListContainerProps, IListContainerS
query = async () => {
this.count += QUERY_SIZE;
const { rid, tmid, showMessageInMainThread, serverVersion, listRef } = this.props;
const { rid, tmid, showMessageInMainThread, serverVersion } = this.props;
const db = database.active;
// handle servers with version < 3.0.0
@ -207,10 +207,10 @@ class ListContainer extends React.Component<IListContainerProps, IListContainerS
}
if (this.mounted) {
if (this.animated) {
listRef.current?.prepareForLayoutAnimationRender();
animateNextTransition();
}
// if (this.animated) {
// listRef.current?.prepareForLayoutAnimationRender();
// animateNextTransition();
// }
this.setState({ messages: data });
} else {
// @ts-ignore

View File

@ -22,7 +22,7 @@ import * as HeaderButton from '../../containers/HeaderButton';
import StatusBar from '../../containers/StatusBar';
import ActivityIndicator from '../../containers/ActivityIndicator';
import { serverInitAdd } from '../../actions/server';
import { animateNextTransition } from '../../lib/methods/helpers/layoutAnimation';
// import { animateNextTransition } from '../../lib/methods/helpers/layoutAnimation';
import { TSupportedThemes, withTheme } from '../../theme';
import EventEmitter from '../../lib/methods/helpers/events';
import { themedHeader } from '../../lib/methods/helpers/navigation';
@ -367,10 +367,10 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
| (Pick<IRoomsListViewState, keyof IRoomsListViewState> | IRoomsListViewState | null),
callback?: () => void
) => {
if (this.animated) {
this.scroll?.prepareForLayoutAnimationRender();
animateNextTransition();
}
// if (this.animated) {
// this.scroll?.prepareForLayoutAnimationRender();
// animateNextTransition();
// }
this.setState(state, callback);
};