Kuba Szczodrzyński 63c5720f63
[App] Move per-register settings to JSON resource. Rewrite Config to use delegates. (#150)
* [App] Add base for AppData loading.

* [UI] Fix timetable widget date navigation.

* [UI] Migrate register-specific behavior to use AppData.

* [App] Implement new delegate-based config base.

* [Config] Migrate config and profile config.

* [Config] Remove defaults from migrations.

* [App] Apply event types and config overrides from AppData.

* [Events] Change default event types for university type school.
2022-10-21 23:59:53 +02:00

18 lines
437 B
Kotlin

/*
* Copyright (c) Kuba Szczodrzyński 2020-2-21.
*/
package pl.szczodrzynski.edziennik.config
import pl.szczodrzynski.edziennik.data.db.enums.NotificationType
@Suppress("RemoveExplicitTypeArguments")
class ProfileConfigSync(base: ProfileConfig) {
var notificationFilter by base.config<Set<NotificationType>> {
NotificationType.values()
.filter { it.enabledByDefault == false }
.toSet()
}
}