Repository navigation
Conversation
A message designed for one scheme can read badly in the other. The switch before Reader View draws the message on screen in the other scheme, for that message alone, and keeps the choice for the session.
Adds the switch's label and tooltip to the template and to every translation, by hand: xtr is not installed here to regenerate them.
Owner
hyprlab
added a commit
that referenced
this pull request
Oct 10, 2026
Settings → Reading → Light / Dark Mode switch shows it, off by default. The choice lasts the session and is kept per message. Co-Authored-By: Fabio Rotondo <2844375+fsoft72@users.noreply.github.com>
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.
What
A Light / Dark Mode switch in the message header, just before the Reader View switch. It draws the message on screen in the other scheme (light or dark) for that message alone, whatever the message theme in Settings says.
Why
Some mail is designed for one scheme and reads badly in the other: a newsletter whose colors do not survive the dark adaptation, or a dark-designed message on a light ground. Changing the global message theme just for one message is overkill.
How
MessageViewkeeps a session-wide set of flipped messages (theme_flips), keyed by(account_id, id), likesender_style.effective_dark()is the message theme (or the system's) turned over when the message on screen is in that set, so the webview ground, the spinner cover and the render fingerprint all follow it with no other change.SetMessageDark, which is a no-op when the scheme already matches (a new message, a system theme change), so there is no feedback loop.po/hylki.potand translated in everypo/*.po(by hand,xtrwas not available to regenerate the template).Testing
cargo build,cargo test message_view(62 passed).