Cleanup
This commit is contained in:
parent
c9062cc089
commit
a6d4644713
@ -469,7 +469,6 @@ class LibraryUpdateService(
|
||||
}
|
||||
// SY <--
|
||||
|
||||
|
||||
return runAsObservable({
|
||||
// SY -->
|
||||
if (source is MergedSource) {
|
||||
|
@ -90,7 +90,7 @@ internal class ExtensionGithubApi {
|
||||
val lang = element.jsonObject["lang"]!!.jsonPrimitive.content
|
||||
val nsfw = element.jsonObject["nsfw"]!!.jsonPrimitive.int == 1
|
||||
// SY -->
|
||||
val icon = "${repoUrl}/icon/${apkName.replace(".apk", ".png")}"
|
||||
val icon = "$repoUrl/icon/${apkName.replace(".apk", ".png")}"
|
||||
// SY <--
|
||||
|
||||
Extension.Available(name, pkgName, versionName, versionCode, lang, nsfw, apkName, icon /* SY --> */, repoUrl /* SY <-- */)
|
||||
|
@ -1,7 +1,6 @@
|
||||
package exh.ui.base
|
||||
|
||||
import androidx.annotation.CallSuper
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
@ -20,9 +19,7 @@ import kotlin.coroutines.EmptyCoroutineContext
|
||||
@Suppress("DEPRECATION", "unused")
|
||||
open class CoroutinePresenter<V>(
|
||||
scope: CoroutineScope = CoroutineScope(Job() + Dispatchers.Main)
|
||||
) : Presenter<V>(),
|
||||
CoroutineScope by scope
|
||||
{
|
||||
) : Presenter<V>(), CoroutineScope by scope {
|
||||
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||
@Deprecated("Use launchInView, Flow.inView, Flow.mapView")
|
||||
override fun getView(): V? {
|
||||
@ -47,10 +44,10 @@ open class CoroutinePresenter<V>(
|
||||
}
|
||||
}
|
||||
|
||||
fun Flow<*>.launchUnderContext(context: CoroutineContext = EmptyCoroutineContext) =
|
||||
launch(this + context) { this@launchInHere.collect() }
|
||||
fun Flow<*>.launchUnderContext(context: CoroutineContext = EmptyCoroutineContext) =
|
||||
launch(context) { this@launchUnderContext.collect() }
|
||||
|
||||
fun Flow<*>.launch() = launchIn(this)
|
||||
fun Flow<*>.launch() = launchIn(this@CoroutinePresenter)
|
||||
|
||||
@CallSuper
|
||||
override fun destroy() {
|
||||
|
@ -15,7 +15,6 @@ import exh.ui.base.CoroutinePresenter
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.plus
|
||||
import uy.kohesive.injekt.Injekt
|
||||
|
Loading…
x
Reference in New Issue
Block a user