Skip to content

Conversation

@eyck
Copy link

@eyck eyck commented Aug 18, 2014

This change set moves the determination of the unread message count into the MessageNotifier transfering the count using the broadcast intend. This way the count on the icon/widget is always in sync with the notifier count.

Aside of that I added some code to get the notification on the icon of Samsung (TouchWiz) and Sony phones; unfortunately only the TouchWiz one is tested.

@eyck
Copy link
Author

eyck commented Aug 21, 2014

Hi tinloaf,
did you have a chance to have a look at it?

-Eyck

@tinloaf
Copy link
Owner

tinloaf commented Aug 21, 2014

Hi,

partly, yes, but I'm not yet sure how to solve everything ;)

  • First, I'm almost sure there are already pull requests against the main repo for TouchWiz/Sense/Whatever. I'd like to keep this a "bare widget" patch, especially since I cannot test with any of those launchers.
  • While this solution probably works (didn't test yet), I'm still not sure whether it is cleaner than having a content observer for the databases. Because that's what we're actually trying to do: The widget should (potentially) react every time something changes in the message databases, the fact that the message notifier usually fires in those circumstances is more of a coincidence.

I'll have a look at this over the weekend, I hope I have some time by then. Thanks in any case!

@eyck
Copy link
Author

eyck commented Aug 22, 2014

At least the TouchWiz part is tested so you may remove the Sony related code.
To your second point: The purpose of the Notifier is to notify the user about new messages and other thing. And the purpose of the widget is to notify the user about new messages. With this approach the always stay in sync which might not be the case if you implement the widget independently (as you might have encountered already ;-) ). And you are going to duplicate functionality which is in my opinion a bad solution.

@tinloaf
Copy link
Owner

tinloaf commented Aug 22, 2014

Well, no. Technically the widget does not notify, but show the current status of the database. ;) That's why I say that a content observer could be cleaner.

I think I'm going to ask @moxie0 and @mcginty about this one, since they are the ones who ultimately have to accept this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants