-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporary workaround for issue #30 #35
Conversation
Issue skiff-org#30 temporarilily solved by this hack.
@@ -48,6 +48,9 @@ internal void CoreWebView2_WebMessageReceived(object sender, CoreWebView2WebMess | |||
var notificationsPayload = JsonSerializer.Deserialize<NotificationDataWrapper>(receivedMessage.Data.ToString()); | |||
foreach (var notification in notificationsPayload.NotificationData) | |||
{ | |||
if (_consumedThreads.Contains(notification.ThreadId)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be messageID
based? you may want notifications for the same threadID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC all our desktop notification actions operate on threadIDs. Based on that, I not even implemented mailID as was not going to have any use, and introduce risk of mistakes. But if we do have it, I can do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, but I see your point on this one. I may want to look into the mailId to hide further notifications rather than the thread. Let me work on it a bit more.
Now the hack works on a per-message basis instead of per thread, so different mails of a thread will still trigger notifications.
Oh right, sent the changes. Also added one missing fundamental line, adding the id to the list 🤦♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Just merged it, great fix. I don't have my release computer with signing keys on it until a few days from now, so waiting on that :'( |
Small hack that will prevent notifications to be triggered more than once for the same threadId. Is a temporary workaround for Issue #30, that will offer more time to elaborate on a propper solution for the underlying issue.