8000 fix(reader): scroll a conversation painted while hidden once it shows by Dandiccf · Pull Request #463 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Unreleased

- **Fixed: a conversation opened at its top instead of its new mail.**
A conversation handed to the reader while it was still covered (by the
loading spinner, or with the window in the background) was painted
again once on screen, and that second paint kept the place of a scroll
that had never happened: the top. It now gets the open scroll to the
first unread or newest message, unless the reader was scrolled.

- **Changed: a reply sent from the reading pane becomes its card in the
conversation.** The editor lifts out of the composer and moves to where
the reply now sits in the conversation, turning into its card on the
Expand Down
7 changes: 7 additions & 0 deletions src/ui/message_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2779,6 +2779,13 @@ impl Component for MessageView {
}
MessageViewInput::Mapped => {
if std::mem::take(&mut self.painted_hidden) && self.current.is_some() && !self.loading {
// The document handed over while hidden never got to
// scroll: unless the reader has a place to keep, the one
// now painted takes the open scroll it was owed, rather
// than staying at the top of the conversation.
if self.saved_anchor.is_none() {
self.did_autoscroll = false;
}
self.shown_fingerprint = None;
self.render();
}
Expand Down
0