diff --git a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/preferences/Preferences.kt b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/preferences/Preferences.kt index 37d0b6e06..71308e8a1 100644 --- a/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/preferences/Preferences.kt +++ b/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/preferences/Preferences.kt @@ -155,14 +155,18 @@ open class Preferences(private val storage: Storage) { } else { try { val activeById = Json.decodeFromString( - MapSerializer(Long.serializer(), NotificationTray.NotificationData.serializer()), + MapSerializer( + Long.serializer(), + NotificationTray.NotificationData.serializer() + ), serialized ) - val activeByHabit = activeById.mapNotNull { (id, v) -> habitList.getById(id)?.let { it to v } } + val activeByHabit = + activeById.mapNotNull { (id, v) -> habitList.getById(id)?.let { it to v } } activeByHabit.toMap(HashMap()) - } catch (e : IllegalArgumentException) { + } catch (e: IllegalArgumentException) { HashMap() - } catch (e : SerializationException) { + } catch (e: SerializationException) { HashMap() } } diff --git a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/NotificationTrayTest.kt b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/NotificationTrayTest.kt index 931386367..2febcf3f1 100644 --- a/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/NotificationTrayTest.kt +++ b/uhabits-core/src/jvmTest/java/org/isoron/uhabits/core/ui/NotificationTrayTest.kt @@ -122,4 +122,4 @@ class NotificationTrayTest : BaseUnitTest() { // TODO test cases where reminders should be removed (e.g. reshowAll) } -} \ No newline at end of file +}