diff --git a/twidere/src/main/kotlin/org/mariotaku/ktextension/CursorExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/ktextension/CursorExtensions.kt index ac6952906..34c70b59b 100644 --- a/twidere/src/main/kotlin/org/mariotaku/ktextension/CursorExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/ktextension/CursorExtensions.kt @@ -26,7 +26,7 @@ fun Cursor.safeGetInt(columnIndex: Int, def: Int = -1) = try { def } -fun Cursor.safeGetString(columnIndex: Int, def: String = "") = try { +fun Cursor.safeGetString(columnIndex: Int, def: String = ""): String = try { getString(columnIndex) } catch (e: IllegalStateException) { def diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/mime4j/ContentTypeFieldExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/mime4j/ContentTypeFieldExtensions.kt index b8db4482b..d45fb1c01 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/mime4j/ContentTypeFieldExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/mime4j/ContentTypeFieldExtensions.kt @@ -30,5 +30,5 @@ fun ContentTypeField.getIntParameter(name: String, def: Int): Int { } fun ContentTypeField.getBooleanParameter(name: String): Boolean { - return getParameter(name).toBoolean() + return this.getParameter(name)!!.toBoolean() } \ No newline at end of file diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableCardEntityExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableCardEntityExtensions.kt index e4b26e71d..3725cbe96 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableCardEntityExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableCardEntityExtensions.kt @@ -46,7 +46,7 @@ fun CardEntity.toParcelable(accountKey: UserKey, accountType: String): Parcelabl fun ParcelableCardEntity.getAsBoolean(key: String, def: Boolean): Boolean { val value = getValue(key) ?: return def - return value.value.toBoolean() + return value.value!!.toBoolean() } fun ParcelableCardEntity.getAsString(key: String, def: String?): String? {