Fixes counter issue for new notifications

This commit is contained in:
tom79 2017-09-24 08:52:16 +02:00
parent fbb22ed576
commit 357614e209
1 changed files with 4 additions and 0 deletions

View File

@ -215,6 +215,10 @@ public class DisplayNotificationsFragment extends Fragment implements OnRetrieve
MainActivity.countNewNotifications++;
this.notifications.add(tmpNotification);
}
SharedPreferences.Editor editor = sharedpreferences.edit();
editor.putString(Helper.LAST_NOTIFICATION_MAX_ID + this.userId, notifications.get(0).getId());
editor.apply();
lastReadNotifications = notifications.get(0).getId();
notificationsListAdapter.notifyDataSetChanged();
}
if( firstLoad )