skiff-org / skiff-windows-app

Skiff's Windows app for privacy-first, end-to-end encrypted Mail, Drive, Calendar, and Pages.
https://skiff.com
GNU Affero General Public License v3.0
108 stars 70 forks source link

[ServiceMessages] Double notification when using notification actions #30

Open Novack opened 9 months ago

Novack commented 9 months ago

Whenever using "Trash" or "Archive" actions from the desktop Windows notifications, then a second notification message arrives from the cloud. My presumption is that -same as with the unread notification messages-, each folder is triggering its own messages.

As a result, we receive the mail in the Inbox triggering a message, then we send that email to Trash or Archive in an unread state and that will trigger a second message from either of the receiving folder.

This is giving a really bad user experience, having the same notification twice for each email.

Propossed solution: newMessageNotifications message should be triggered only once for each mail.

Novack commented 9 months ago

@amilich the true fix for this issue (same as #31) would be to fix the behaviour of the messages coming from the cloud app to the desktop app. That being said, until that moment comes, we can add a temporary workaround in the desktop app.

Have a look at the link, has a small hack that will prevent notifications to be triggered more than once for the same threadId: https://github.com/skiff-org/skiff-windows-app/commit/78985e10525060077aff6d396f5f2e40bedadb48

If you think is suitable, I can make a PR.

amilich commented 9 months ago

I agree with that, not sure what to do about folders yet. I was thinking to first focus on sending the notification info from the other Skiff apps (Pages/Drive/Calendar).

Novack commented 9 months ago

Oh right then, if you ok, I will send a PR, it will give us more time to consider the best approach for the underlying issue. 👍