Message List: Fix notch appearing on open chat (#1479)
This commit is contained in:
parent
609c0cb68e
commit
4d7b16bb88
@ -382,7 +382,7 @@ const MessageList: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
newScrollTop = scrollHeight - offsetHeight;
|
newScrollTop = scrollHeight - offsetHeight;
|
||||||
scrollOffsetRef.current = Math.max(scrollHeight - newScrollTop, offsetHeight);
|
scrollOffsetRef.current = Math.max(Math.ceil(scrollHeight - newScrollTop), offsetHeight);
|
||||||
|
|
||||||
// Scroll still needs to be restored after container resize
|
// Scroll still needs to be restored after container resize
|
||||||
if (!shouldForceScroll) {
|
if (!shouldForceScroll) {
|
||||||
@ -421,7 +421,7 @@ const MessageList: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
newScrollTop = scrollHeight - scrollOffset;
|
newScrollTop = scrollHeight - scrollOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetScroll(container, newScrollTop);
|
resetScroll(container, Math.ceil(newScrollTop));
|
||||||
|
|
||||||
if (!memoFocusingIdRef.current) {
|
if (!memoFocusingIdRef.current) {
|
||||||
isScrollTopJustUpdatedRef.current = true;
|
isScrollTopJustUpdatedRef.current = true;
|
||||||
@ -430,7 +430,7 @@ const MessageList: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
scrollOffsetRef.current = Math.max(scrollHeight - newScrollTop, offsetHeight);
|
scrollOffsetRef.current = Math.max(Math.ceil(scrollHeight - newScrollTop), offsetHeight);
|
||||||
|
|
||||||
if (process.env.APP_ENV === 'perf') {
|
if (process.env.APP_ENV === 'perf') {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user