Skip to content

Commit

Permalink
fix(local-notifications): don't store notifications if not scheduled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Mar 15, 2021
1 parent 2f55f20 commit c1445fd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ public void appendNotifications(List<LocalNotification> localNotifications) {
SharedPreferences storage = getStorage(NOTIFICATION_STORE_ID);
SharedPreferences.Editor editor = storage.edit();
for (LocalNotification request : localNotifications) {
String key = request.getId().toString();
editor.putString(key, request.getSource());
if (request.isScheduled()) {
String key = request.getId().toString();
editor.putString(key, request.getSource());
}
}
editor.apply();
}
Expand Down

0 comments on commit c1445fd

Please sign in to comment.