-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement "scroll-back" to latest message when navigating replies #877
base: dev
Are you sure you want to change the base?
Conversation
This commit adds a navigation history for quoted messages, such as if Alice navigated to message A by pressing the "quoted message" inside the reply message B and pressed the "scroll down button", the chat will be scrolled back to message B instead of the very bottom. This is true for as many replies as the user navigates through. All the messages higher than the lowest fully visible message are automatically cleared from the stack as the user scrolls. This feature makes it easier to read threaded conversations, especially in scenarios with much to catch up on. This is most useful in group chats and communities.
} | ||
|
||
func onScrollFinished() { | ||
DispatchQueue.main.async { [weak self] in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we perhaps want to add the older code from scrollViewDidEndDragging
and scrollViewDidEndScrollingAnimation
to onScrollFinished
as well? I'm not entirely sure they need to be fired every time scrolling is complete, though :)
// MARK: - SessionUtilRespondingViewController | ||
|
||
func isConversation(in threadIds: [String]) -> Bool { | ||
return threadIds.contains(self.viewModel.threadData.threadId) | ||
} | ||
} | ||
|
||
struct ConversationReplyNavigationStack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a better place to add this, but let me know if there is one, and I'll move it :)
@RyanRory PTL :) |
I'll add this to the planning backlog, but will require some review and will be fairly low priority for now considering other tasks ongoing (Push notification and disappearing message overhauls) |
Contributor checklist
Description
This commit adds a navigation history for quoted messages, such as if
Alice navigated to message A by pressing the "quoted message" inside the
reply message B and pressed the "scroll down button", the chat will be
scrolled back to message B instead of the very bottom. This is true for
as many replies as the user navigates through.
All the messages higher than the lowest fully visible message
are automatically cleared from the stack as the user scrolls.
This feature makes it easier to read threaded conversations,
especially in scenarios with much to catch up on. This is most useful in
group chats and communities.
Demo screen recording:
Screen.Recording.2023-07-28.at.21.14.03.mov