Skip to content

Commit

Permalink
misc tmp logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Nov 3, 2018
1 parent cb8c5d8 commit 722dfdf
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -85,6 +85,7 @@ protected PushNotificationsProp getProps() {
}

private void updateNotification() {
Log.v(TAG, String.format("updateNotification: %d", conversations.size()));
final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE);
if (conversations.isEmpty()) {
notificationManager.cancelAll();
Expand All @@ -98,11 +99,14 @@ private void updateNotification() {

@Override
public void onReceived() throws InvalidNotificationException {
Log.v(TAG, "onReceived");
final String eventType = getProps().getEvent();
if (eventType.equals("message")) {
Log.v(TAG, "onReceived: add");
addConversationToMap(getProps(), conversations);
updateNotification();
} else if (eventType.equals("remove")) {
Log.v(TAG, "onReceived: remove");
removeConversationFromMap(getProps(), conversations);
updateNotification();
} else {
Expand Down

0 comments on commit 722dfdf

Please sign in to comment.