Skip to content

Improve notifications emblem counter in unity8 icon

Flo Lee requested to merge improve-notifications-counter into master

This is not the most beautiful refactoring and extension I have done but it works surprisingly well:

  • As Telegram is now sending only count of unread messages per group/chat/whatsoever, the push client cannot determine the number from each notification any more.
  • Therefore, I have extended the auxiliary database to also store current count of unread messages per group and tally the sum if needed.
  • I also extracted the Postal client into a common component, so that both push helper and main app can set the counter for the emblem and also dismiss notifications.

The result is:

  • Notifications are now cleared every time a chat has been read up to its last message
  • The emblem counter is correctly showing the current number of unread messages when the app gets active. The push notifications will also update it, but only for unmuted groups/chats (for others we dont get the info ofc).

This will fix #75 (closed)

Edited by Flo Lee

Merge request reports