diff --git a/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt b/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt index 34ff6474b..d211eb495 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/Converters.kt @@ -126,13 +126,13 @@ class Converters @Inject constructor ( } @TypeConverter - fun dateToLong(date: Date): Long { - return date.time + fun dateToLong(date: Date?): Long? { + return date?.time } @TypeConverter - fun longToDate(date: Long): Date { - return Date(date) + fun longToDate(date: Long?): Date? { + return date?.let { Date(it) } } @TypeConverter