Ensure that message heights are always recomputed

This commit is contained in:
Fedor Indutny 2021-11-30 20:34:56 +01:00 committed by GitHub
parent 77924918df
commit 518ebc315e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View file

@ -81,6 +81,7 @@ export type PropsDataType = {
isNearBottom?: boolean;
items: ReadonlyArray<string>;
loadCountdownStart?: number;
messageHeightChangeBaton?: unknown;
messageHeightChangeIndex?: number;
oldestUnreadIndex?: number;
resetCounter: number;
@ -132,7 +133,7 @@ export type PropsActionsType = {
acknowledgeGroupMemberNameCollisions: (
groupNameCollisions: Readonly<GroupNameCollisionsWithIdsByTitle>
) => void;
clearChangedMessages: (conversationId: string) => unknown;
clearChangedMessages: (conversationId: string, baton: unknown) => unknown;
clearInvitedUuidsForNewlyCreatedGroup: () => void;
closeContactSpoofingReview: () => void;
setLoadCountdownStart: (
@ -1031,6 +1032,7 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
isIncomingMessageRequest,
items,
messageHeightChangeIndex,
messageHeightChangeBaton,
oldestUnreadIndex,
resetCounter,
scrollToIndex,
@ -1088,7 +1090,7 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
if (isNumber(messageHeightChangeIndex)) {
resizeStartRow = this.fromItemIndexToRow(messageHeightChangeIndex);
clearChangedMessages(id);
clearChangedMessages(id, messageHeightChangeBaton);
}
if (