Merge pull request #400 from jellyfin/kt-1510

Update Kotlin to 1.5.10 and revert obsolete workaround
This commit is contained in:
Niels van Velzen authored and GitHub committed 2021-05-24 14:31:02 +02:00
commit 83c46e9b71
2 files changed
+1 -27

No files matched your search

@@ -1,26 +0,0 @@
package org.jellyfin.mobile.player.source
class Result<T> private constructor(
val value: T?,
val error: Throwable?,
) {
@Suppress("NOTHING_TO_INLINE")
inline fun getOrNull(): T? = value
@Suppress("UNCHECKED_CAST")
inline fun onSuccess(action: (T) -> Unit): Result<T> {
if (error == null) action(value as T)
return this
}
inline fun onFailure(action: (Throwable) -> Unit): Result<T> {
if (error != null) action(error)
return this
}
companion object {
fun <T> success(value: T) = Result(value, null)
fun <T> failure(error: Throwable) = Result<T>(null, error)
}
}
+1 -1
View File
@@ -19,6 +19,6 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Kotlin version for this project
kotlinVersion=1.5.0
kotlinVersion=1.5.10
# Use snapshot release of Jellyfin SDK
useSdkSnapshot=false