Page MenuHomePhabricator

D7850.id26955.diff
No OneTemporary

D7850.id26955.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
@@ -29,6 +29,7 @@
} from 'lib/utils/action-utils.js';
import css from './chat-message-list.css';
+import { useEditModalContext } from './edit-message-provider.js';
import { MessageListContext } from './message-list-types.js';
import Message from './message.react.js';
import RelationshipPrompt from './relationship-prompt/relationship-prompt.js';
@@ -62,6 +63,7 @@
+inputState: ?InputState,
+clearTooltip: () => mixed,
+oldestMessageServerID: ?string,
+ +isEditState: boolean,
};
type Snapshot = {
+scrollTop: number,
@@ -120,7 +122,10 @@
messageListData &&
messageListData[0].itemType === 'message' &&
messageListData[0].messageInfo.localID) ||
- (hasNewMessage && snapshot && Math.abs(snapshot.scrollTop) <= 1)
+ (hasNewMessage &&
+ snapshot &&
+ Math.abs(snapshot.scrollTop) <= 1 &&
+ !this.props.isEditState)
) {
this.scrollToBottom();
} else if (hasNewMessage && messageContainer && snapshot) {
@@ -308,6 +313,9 @@
const oldestMessageServerID = useOldestMessageServerID(threadInfo.id);
+ const { editState } = useEditModalContext();
+ const isEditState = editState !== null;
+
return (
<MessageListContext.Provider value={messageListContext}>
<ChatMessageList
@@ -321,6 +329,7 @@
fetchMostRecentMessages={callFetchMostRecentMessages}
clearTooltip={clearTooltip}
oldestMessageServerID={oldestMessageServerID}
+ isEditState={isEditState}
/>
</MessageListContext.Provider>
);

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 9:06 PM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2711682
Default Alt Text
D7850.id26955.diff (1 KB)

Event Timeline