mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
This commit will now allow us to track read position in a thread and returns to this position when you open the thread. Note this commit is also extracting the following components to make it possible: - `<ChatMessagesScroller />` - `<ChatMessagesContainer />` The `UpdateUserThreadLastRead` has been updated to allow this. Various refactorings have also been done to the code and specs to improve the support of last read.
18 lines
493 B
Plaintext
18 lines
493 B
Plaintext
import { hash } from "@ember/helper";
|
|
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
|
|
import ChatScrollableList from "../modifiers/chat/scrollable-list";
|
|
|
|
const ChatMessagesScroller = <template>
|
|
<div
|
|
class="chat-messages-scroller popper-viewport"
|
|
{{didInsert @onRegisterScroller}}
|
|
{{ChatScrollableList
|
|
(hash onScroll=@onScroll onScrollEnd=@onScrollEnd reverse=true)
|
|
}}
|
|
>
|
|
{{yield}}
|
|
</div>
|
|
</template>;
|
|
|
|
export default ChatMessagesScroller;
|