-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix(Notify): Use notification categories on Linux #427
base: master
Are you sure you want to change the base?
Conversation
After more testing, I think more work is needed for notifications in general. If multiple notifications are generated, qTox simply changes the existing notification to say "3 message(s) from user". I imagine this is an artifact of snore-notify. Additionally, incoming call notifications do not clear if the call has been cancelled. I think it would be best to delay merging this until these other issues can be addressed. |
Ok so I went a bit out of scope here (meant to start a new branch, oops), but so far I've managed to fix most of the issues I listed before. |
The main reason I used a single notification and made it update is the situation where you receive a lot of messages all at once. What happens with your change when someone spams a chat? In any case I think what we had was quite broken, so I'm happy to take a step back and simplify for now. |
It would be kind of cool to group the messages from one contact into single notifications (without mixing categories). The notification generator would need to track the notification IDs in use for each contact. Perhaps we could use the contact number to make it super simple. I might have a poke at that. I think we have a few options here:
I dislike the first one because I am unable to read the messages in the notifications. One notification shared for everything is too conservative in my opinion. |
What about making this a settings option - updating the existing notification on an event vs adding a new notification per event? Might not be possible to do on every platform, but sounds like it might be useful for the ones that support it. |
We're really focussing on Linux here. Other platforms use the Qt built-in thing, which doesn't allow notification fusing, categories, etc. at all. I do believe our best UX is going to be on Linux (and I'm very OK with that). For that, I think option 2 is best, but we can go ahead with 3 for the moment, and make 2 as an improvement on top of that (unless you want to do it now, I'm happy with that as well). |
It might be best to keep this PR somewhat on track here and stick with individual notifications for now as you say. |
d18ac6b
to
127e0cb
Compare
I'm just redoing all my commits at the moment, not very git-savvy |
Reopening since I didn't mean to close |
Depending on the mess, probably most of the time you can use |
e7b753a
to
f2f80f1
Compare
Ok that should be all of my changes back in place. |
EDIT: Looking at it again, the windows build test is failing due to an unused variable, but it is used in the very next line. |
That's because it's only used in |
89fe35d
to
53304ed
Compare
|
Use categories as defined by FreeDesktop. Addresses TokTok#424
Send a new notification for each event instead of reusing one notification.
53304ed
to
8d2eb69
Compare
With this change, events will notify using distinct categories.
Incoming calls use
call.incoming
Friend and conference messages use
im.received
Friend requests and group invites use the generic
im
File transfer requests use the generic
transfer
Since call notifications used the same exact code paths as friend message notifications, I had to change some logic in the newFriendMessageAlert function. It uses the notification body (
text
) being empty to determine that it is an incoming call.Solves #424
This change is