mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: improves unread state precision (#20615)
- Will consider a message read only one the bottom of the message has been read - Will allow to mark a message bigger than the view port as read - Code should be more performant as the scroll is doing less (albeit more often) - Gives us a very precise scroll state. Problem with throttling scroll is that you could end up never getting the even where scrollTop is at 0, opening a whole range of edge cases to handle
This commit is contained in:
@ -55,8 +55,8 @@ module("Discourse Chat | Component | chat-message", function (hooks) {
|
||||
onSelectMessage: () => {},
|
||||
bulkSelectMessages: () => {},
|
||||
onHoverMessage: () => {},
|
||||
didShowMessage: () => {},
|
||||
didHideMessage: () => {},
|
||||
messageDidEnterViewport: () => {},
|
||||
messageDidLeaveViewport: () => {},
|
||||
forceRendering: () => {},
|
||||
};
|
||||
}
|
||||
@ -74,9 +74,8 @@ module("Discourse Chat | Component | chat-message", function (hooks) {
|
||||
@onSelectMessage={{this.onSelectMessage}}
|
||||
@bulkSelectMessages={{this.bulkSelectMessages}}
|
||||
@onHoverMessage={{this.onHoverMessage}}
|
||||
@didShowMessage={{this.didShowMessage}}
|
||||
@didHideMessage={{this.didHideMessage}}
|
||||
@didHideMessage={{this.didHideMessage}}
|
||||
@messageDidEnterViewport={{this.messageDidEnterViewport}}
|
||||
@messageDidLeaveViewport={{this.messageDidLeaveViewport}}
|
||||
@forceRendering={{this.forceRendering}}
|
||||
/>
|
||||
`;
|
||||
|
Reference in New Issue
Block a user