moezbhatti / qksms

The most beautiful SMS messenger for Android
https://qklabs.com/download
GNU General Public License v3.0
4.48k stars 1.06k forks source link

Incorrect unread message indicator #311

Open joallard opened 8 years ago

joallard commented 8 years ago

I can't reproduce this consistently, but sometimes, even when I've read all my messages, a little (1) digit will remain on the app icon in launcher and home screen shortcut.

tariq86 commented 8 years ago

Which app are you using to show notifications on the app icon? For example, Tesla Unread

joallard commented 8 years ago

I'm not aware of any app, I thought this was out of the box?

moezbhatti commented 8 years ago

Which phone / ROM are you using?

joallard commented 8 years ago

Android Revolution 43 on HTC M8

moezbhatti commented 6 years ago

Fixed in f03adec5c0cd447b7bcfa6547aae8f8c7e54ef9d

Though it might require a message resync

moezbhatti commented 6 years ago

This still seems to be happening on certain phones. I believe the culprit for this is in MessageRepositoryImpl.insertReceivedSms

When we insert the message into the native content provider, the Uri returned from ContentResolver.insert() is null on some phones.

This means that we don't end up storing the message's ContentID, and so when we mark messages as read, these aren't updated in the native content provider.

On some launchers, this won't matter, because we manually set the unread badge number.

On others, this is problematic because they ignore the value that we set, and automatically determine the unread count themselves based on the SMS ContentProvider (which won't be accurate on certain devices)