fix(notification): scheduled notifications not working (#909)

* fix(notification): scheduled notifications not working

* do not use toJSON since it doesnt work on isolation pattern

* fmt
This commit is contained in:
Lucas Fernandes Nogueira
2024-01-24 13:02:11 -03:00
committed by GitHub
parent 61edbbec0a
commit 8dea78ac7d
11 changed files with 102 additions and 56 deletions
@@ -20,7 +20,7 @@ class NotificationStorage(private val context: Context, private val jsonMapper:
val storage = getStorage(NOTIFICATION_STORE_ID)
val editor = storage.edit()
for (request in localNotifications) {
if (request.isScheduled) {
if (request.schedule != null) {
val key: String = request.id.toString()
editor.putString(key, request.sourceJson.toString())
}