Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3541823
D7850.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7850.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 27, 7:20 AM (9 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2711682
Default Alt Text
D7850.diff (1 KB)
Attached To
Mode
D7850: [web] Handle new messages when in edit mode
Attached
Detach File
Event Timeline
Log In to Comment