Skip to content

fix: correct message selection behind date separators (#316, #324, #381)#424

Merged
boxdot merged 6 commits intoboxdot:mainfrom
so-rose:main
Aug 29, 2025
Merged

fix: correct message selection behind date separators (#316, #324, #381)#424
boxdot merged 6 commits intoboxdot:mainfrom
so-rose:main

Conversation

@so-rose
Copy link
Copy Markdown
Contributor

@so-rose so-rose commented Aug 29, 2025

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.

…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.
boxdot and others added 4 commits August 29, 2025 15:12
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
@boxdot
Copy link
Copy Markdown
Owner

boxdot commented Aug 29, 2025

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.

@boxdot boxdot merged commit 5df3a73 into boxdot:main Aug 29, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants