Fix code style

pull/1509/head
Felix Wiemuth 3 years ago
parent e65357bc14
commit ee0663e5e5

@ -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()
}
}

@ -122,4 +122,4 @@ class NotificationTrayTest : BaseUnitTest() {
// TODO test cases where reminders should be removed (e.g. reshowAll)
}
}
}

Loading…
Cancel
Save