Page MenuHomePhabricator

D13634.id44970.diff
No OneTemporary

D13634.id44970.diff

diff --git a/web/chat/chat-message-list.react.js b/web/chat/chat-message-list.react.js
--- a/web/chat/chat-message-list.react.js
+++ b/web/chat/chat-message-list.react.js
@@ -17,11 +17,7 @@
threadOtherMembers,
} from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js';
-import {
- threadTypeIsPersonal,
- threadTypeIsThick,
-} from 'lib/types/thread-types-enum.js';
-import sleep from 'lib/utils/sleep.js';
+import { threadTypeIsPersonal } from 'lib/types/thread-types-enum.js';
import { defaultMaxTextAreaHeight, editBoxHeight } from './chat-constants.js';
import css from './chat-message-list.css';
@@ -122,7 +118,11 @@
const prevMessageListData = prevProps.messageListData;
const { messageContainer } = this;
- if (messageContainer && prevMessageListData !== messageListData) {
+ if (
+ messageContainer &&
+ prevMessageListData !== messageListData &&
+ messageContainer.scrollTop === 0
+ ) {
this.onScroll();
}
@@ -382,9 +382,6 @@
this.loadingFromScroll = true;
try {
- if (threadTypeIsThick(this.props.threadInfo.type)) {
- await sleep(100);
- }
await this.props.fetchMessages();
} finally {
this.loadingFromScroll = false;

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 9:58 AM (19 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2291115
Default Alt Text
D13634.id44970.diff (1 KB)

Event Timeline