8000 fix(notifications): stay quiet for mail a filter sends to trash or junk by fsoft72 · Pull Request #621 · hyprlab/hylki · GitHub
[go: up one dir, main page]

Skip to content

fix(notifications): stay quiet for mail a filter sends to trash or junk - #621

Closed
fsoft72 wants to merge 1 commit into
hyprlab:mainfrom
fsoft72:fix/no-notify-for-filtered-mail
Closed

fsoft72 wants to merge 1 commit into
hyprlab:mainfrom
fsoft72:fix/no-notify-for-filtered-mail

Conversation

@fsoft72
@fsoft72 fsoft72 commented Nov 9, 2026
Copy link
Copy Markdown
Contributor

Problem

When a filter moves a newly arrived message straight into Trash or Junk, Hylki still raises a new mail notification (and plays its sound). The tray icon, which counts only what stays in the inbox, correctly shows nothing new, so the two disagree.

The cause is in notify_new_mail (src/app/events_messages.rs): mail a filter filed elsewhere is counted as new mail (#47 feedback) whatever its destination folder.

Fix

  • New announces_filed helper: mail filed into a Trash or Junk folder is left out of the notification; mail filed into any other folder (or a folder not known yet) is still announced as before.
  • Filter deletes and the blacklist were already excluded, so they are unchanged.

Tests

  • Two unit tests for announces_filed (failed before the fix).
  • cargo test --bin hylki: 1459 passed.
  • Tested by hand: a filter moving new mail to Trash no longer shows a notification.

🤖 Generated with Claude Code

Mail a filter filed into another folder was announced as new mail
whatever the destination, so a message moved straight to Trash or Junk
still raised a notification and its sound while the tray icon, which
counts only what stays in the inbox, showed nothing new. Leave out
mail filed into Trash or Junk; mail filed anywhere else is still
announced.
hyprlab added a commit that referenced this pull request Nov 9, 2026
A filter that moved new mail to Trash or Junk still raised a notification and its sound. Mail filed anywhere else is still announced.

Co-Authored-By: Fabio Rotondo <2844375+fsoft72@users.noreply.github.com>
@hyprlab
hyprlab commented Nov 9, 2026
Copy link
Copy Markdown
Owner

Thank you! This PR will be merged in today's beta build!

hyprlab added a commit that referenced this pull request Nov 9, 2026
Insert Template, shared send-as addresses and a signature's sender name (#610), Microsoft accounts after a suspend (#618), the merge CSV freeze (#617), no alert for mail filed to Trash or Junk (#621), reader colors (#619, #616), the delete warning translated (#620) and French (#615).
@hyprlab
hyprlab commented Nov 9, 2026
Copy link
Copy Markdown
Owner

Agentic reply:

The beta build is in the repo now. If you already have the beta installed, flatpak update picks it up. If not, download and install it first:

flatpak install --user --from https://hylki.hyprlab.co/flatpak/co.hyprlab.Hylki.Beta.flatpakref

RPM, Debian and AppImage betas: Beta channel.

@hyprlab hyprlab closed this Nov 9, 2026
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.

2 participants

0