forked from github/szkolny
[UI] Fix notes not showing in note list dialog.
This commit is contained in:
parent
c21d89cf60
commit
00e077d01f
@ -5,13 +5,37 @@
|
|||||||
package pl.szczodrzynski.edziennik.data.db.converter
|
package pl.szczodrzynski.edziennik.data.db.converter
|
||||||
|
|
||||||
import androidx.room.TypeConverter
|
import androidx.room.TypeConverter
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.FeatureType
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.LoginMethod
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.LoginMode
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.LoginType
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.MetadataType
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.enums.NotificationType
|
||||||
import pl.szczodrzynski.edziennik.ext.*
|
import pl.szczodrzynski.edziennik.ext.*
|
||||||
import pl.szczodrzynski.edziennik.ui.base.enums.NavTarget
|
import pl.szczodrzynski.edziennik.ui.base.enums.NavTarget
|
||||||
|
|
||||||
class ConverterEnums {
|
class ConverterEnums {
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun fromEnum(value: Enum<*>?) = value?.toInt()
|
fun fromFeatureType(value: FeatureType?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromLoginMethod(value: LoginMethod?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromLoginMode(value: LoginMode?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromLoginType(value: LoginType?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromMetadataType(value: MetadataType?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromNotificationType(value: NotificationType?) = value?.id
|
||||||
|
|
||||||
|
@TypeConverter
|
||||||
|
fun fromNavTarget(value: NavTarget?) = value?.id
|
||||||
|
|
||||||
@TypeConverter
|
@TypeConverter
|
||||||
fun toFeatureType(value: Int?) = value.asFeatureTypeOrNull()
|
fun toFeatureType(value: Int?) = value.asFeatureTypeOrNull()
|
||||||
|
Loading…
Reference in New Issue
Block a user