Show notification indicator when a notification is available
This change removes the newNotification flag and the clear flag function and replaces it with whether notifications are available (have not been swiped). Thus, the indicator is shown even when alerts are on and stays until all are dismissed.
Fixes #1216
Previously, the notification indicator was displayed when a notification was missed (mostly when the "do not disturb" mode was enabled and when a notification was received while the user was in an app).
This PR changes the "meaning" of that indicator : instead of notifying the user that they missed a notification, it tells the user that there are notifications that are not dimissed yet.
I'm OK with the current behavior, but I know that some users were confused by this notification indicator. So... any other opinion about this? @InfiniTimeOrg/core-developers ?
EDIT : since this PR removes NotificationManager::ClearNewNotificationFlag(), changes will be needed in InfiniSim if we were to merged it.
Yes, I've been thinking about this and it seems like a good idea, but the color of the icon should probably be changed to white, so it's less ugly to look at when it will be seen for extended periods of time.
A combination would also be possible. Keep the green indicator for the missed notification when alerts are off, add a white one for notifications that haven't been swiped. I'm fine either way, I can change the PR depending on what you prefer.
My two cents based on how I use InfiniTime, with the disclaimer that I have no clue if anyone uses the watch in a similar way to me:
Currently, dismissing a notification on the PineTime does not actually get rid of the notification on the paired device; it only discards it within InifiniTime. On top of this, notifications in InfiniTime don't work like in Android or iOS due to the fact that only 5 can be displayed, so older notifications get overwritten as you get more.
Because of this, I have always thought of the notification list on InfiniTime as a list of recent notifications, rather than a list of unread notifications. For me at least, it works really well like this, and honestly I've never felt the need to dismiss a notification; I just let the older ones get overwritten, and the vibration (or icon in "Do not Disturb" mode) have always been enough that I always knew when I got a new unread notification.
Of course, the ability to dismiss notifications does not hinder the way I use my watch and thus is not an issue. However, for someone that uses the notification list like I do, merging this PR would mean that I would have a constant notification icon in the status bar, which would make the symbol meaningless, becoming just visual clutter.
From a more objective point of view, if a more phone-like notification list is what InifiniTime wants to move towards, I don't know if it would be the right time to merge this PR; making this change encourages the user to dismiss all their notifications on the PineTime as soon as they see it, but as I mentioned this doesn't (yet) dismiss the notification on the paired device, and vice versa. This effectively means that every notification you get on the paired device would have to be dismissed twice (once on the PineTime and once on the paired device), which at least to me sounds like a lot of hassle.
With all this said, the dual colour notification idea proposed by @0cc4m would partially solve my issue (I'd still have a green notification icon for when I actually needed it), and if I'm not the only one that uses the notifications list like I do, a setting could be added in the worst case to accomodate everyone.
Interesting perspective @DanieleVBella I did not consider this because I use the notifications differently. For me they don't act as full access to the device notification, since they only show a small part of the text anyways. For this reason I wouldn't like if they removed the notification on the host device either. I use them only as a small preview to an event on the phone, which is enough to know the broad urgency of the notification. That's why I dismiss them on the watch as soon as I've read them.
Looks like more consideration is required to find a solution that suits everyone or at least most people.
I updated the PR with a version that keeps the NewNotification flag and indicator. I updated the watch faces to show the notification in green (white for PineTime watch face) when NewNotification is set or white (black for PineTime watch face) when the notification buffer is not empty.
I can look into creating a simple settings page to switch between only showing the indicator for new notifications (current behavior) and also showing when notifications have not been swiped. Please let me know what you think.
I agree with @DanieleVBella and I guess there isn't a good reason to change this behaviour right now after all. The dual color idea seems too complicated to me.
My usage of the notification functionality is very similar to @DanieleVBella's : I mostly look at the overview of the notification to know what it's about so that I know if I have to check my phone. I rarely look at the notification history nor feel the need to dismiss them. @0cc4m According to our project vision and principle, we prefer a solid and predictable default behavior over settings and customization, which means that we try to avoid adding new settings and options unless they are absolutely necessary. In this case, we'll probably keep the current behavior as is until (for example) notifications are also dismissed on the phone.
Thanks! I'll take a look at the merge conflict soon.
I'll close this since we won't be changing this behavior until the notifications are synced with the phone. https://github.com/InfiniTimeOrg/InfiniTime/pull/1234#issuecomment-1192398826