fix: correct message selection behind date separators (#316, #324, #381)#424
Merged
boxdot merged 6 commits intoboxdot:mainfrom Aug 29, 2025
Merged
fix: correct message selection behind date separators (#316, #324, #381)#424boxdot merged 6 commits intoboxdot:mainfrom
boxdot merged 6 commits intoboxdot:mainfrom
Conversation
…xdot#324, boxdot#381) This is a very hacky fix to the issue of incorrect message selection, which affected reactions and copying (at least). `selected_message_id` was making the presumption that indices in the UI list corresponded directly to indices in the messages list. This presumption is incorrect when date separators are used. In lieu of a proper architectural intervention, this commit replicates the logic from `draw.rs`, checking whether a day transition occurs in the local timezone that would prompt the insertion of a date line - if so, an index correction is applied. Performance was not profiled, but seems aesthetically unaffected.
Also - Fix rust warnings - Use xcode 16.4 - Fail on warnings - Cancel jobs in progress on the same branch - Only run jobs on pull request - Enabled rust cache for clippy jobs
Owner
|
Thank you! This is a very annoying bug I am hitting from day to day. I guess a proper solution would be to remove these separators fully. Or maybe to store the state from drawing somewhere. I guess it makes sense to check how it is done in other apps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a very hacky fix to the issue of incorrect message selection, which affected reactions and copying (at least).
selected_message_idwas making the presumption that indices in the UI list corresponded directly to indices in the messages list. This presumption is incorrect when date separators are used.In lieu of a proper architectural intervention, this commit replicates the logic from
draw.rs, checking whether a day transition occurs in the local timezone that would prompt the insertion of a date line - if so, an index correction is applied.Performance was not profiled, but seems aesthetically unaffected.