Run linter
This commit is contained in:
@@ -6,12 +6,12 @@ import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues as Values
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||
import eu.kanade.tachiyomi.ui.security.SecureActivityDelegate
|
||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues as Values
|
||||
|
||||
abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
@@ -54,5 +54,4 @@ abstract class BaseActivity : AppCompatActivity() {
|
||||
|
||||
SecureActivityDelegate.onResume(this)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,5 +24,4 @@ abstract class BaseRxActivity<P : BasePresenter<*>> : NucleusAppCompatActivity<P
|
||||
|
||||
SecureActivityDelegate.onResume(this)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -123,5 +123,4 @@ abstract class BaseController(bundle: Bundle? = null) : RestoreViewOnCreateContr
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ abstract class DialogController : RestoreViewOnCreateController {
|
||||
dialog!!.onRestoreInstanceState(dialogState)
|
||||
}
|
||||
}
|
||||
return View(activity) //stub view
|
||||
return View(activity) // stub view
|
||||
}
|
||||
|
||||
override fun onSaveViewState(view: View, outState: Bundle) {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package eu.kanade.tachiyomi.ui.base.controller
|
||||
|
||||
interface NoToolbarElevationController
|
||||
interface NoToolbarElevationController
|
||||
|
||||
@@ -42,7 +42,6 @@ abstract class RxController(bundle: Bundle? = null) : BaseController(bundle) {
|
||||
untilDestroySubscriptions.unsubscribe()
|
||||
}
|
||||
|
||||
|
||||
fun <T> Observable<T>.subscribeUntilDetach(): Subscription {
|
||||
|
||||
return subscribe().also { untilDetachSubscriptions.add(it) }
|
||||
@@ -53,15 +52,19 @@ abstract class RxController(bundle: Bundle? = null) : BaseController(bundle) {
|
||||
return subscribe(onNext).also { untilDetachSubscriptions.add(it) }
|
||||
}
|
||||
|
||||
fun <T> Observable<T>.subscribeUntilDetach(onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit): Subscription {
|
||||
fun <T> Observable<T>.subscribeUntilDetach(
|
||||
onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit
|
||||
): Subscription {
|
||||
|
||||
return subscribe(onNext, onError).also { untilDetachSubscriptions.add(it) }
|
||||
}
|
||||
|
||||
fun <T> Observable<T>.subscribeUntilDetach(onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit,
|
||||
onCompleted: () -> Unit): Subscription {
|
||||
fun <T> Observable<T>.subscribeUntilDetach(
|
||||
onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit,
|
||||
onCompleted: () -> Unit
|
||||
): Subscription {
|
||||
|
||||
return subscribe(onNext, onError, onCompleted).also { untilDetachSubscriptions.add(it) }
|
||||
}
|
||||
@@ -76,17 +79,20 @@ abstract class RxController(bundle: Bundle? = null) : BaseController(bundle) {
|
||||
return subscribe(onNext).also { untilDestroySubscriptions.add(it) }
|
||||
}
|
||||
|
||||
fun <T> Observable<T>.subscribeUntilDestroy(onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit): Subscription {
|
||||
fun <T> Observable<T>.subscribeUntilDestroy(
|
||||
onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit
|
||||
): Subscription {
|
||||
|
||||
return subscribe(onNext, onError).also { untilDestroySubscriptions.add(it) }
|
||||
}
|
||||
|
||||
fun <T> Observable<T>.subscribeUntilDestroy(onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit,
|
||||
onCompleted: () -> Unit): Subscription {
|
||||
fun <T> Observable<T>.subscribeUntilDestroy(
|
||||
onNext: (T) -> Unit,
|
||||
onError: (Throwable) -> Unit,
|
||||
onCompleted: () -> Unit
|
||||
): Subscription {
|
||||
|
||||
return subscribe(onNext, onError, onCompleted).also { untilDestroySubscriptions.add(it) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,11 +5,13 @@ import eu.davidea.flexibleadapter.FlexibleAdapter
|
||||
import eu.davidea.viewholders.FlexibleViewHolder
|
||||
import kotlinx.android.extensions.LayoutContainer
|
||||
|
||||
abstract class BaseFlexibleViewHolder(view: View,
|
||||
adapter: FlexibleAdapter<*>,
|
||||
stickyHeader: Boolean = false) :
|
||||
abstract class BaseFlexibleViewHolder(
|
||||
view: View,
|
||||
adapter: FlexibleAdapter<*>,
|
||||
stickyHeader: Boolean = false
|
||||
) :
|
||||
FlexibleViewHolder(view, adapter, stickyHeader), LayoutContainer {
|
||||
|
||||
override val containerView: View?
|
||||
get() = itemView
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,8 +41,13 @@ interface SlicedHolder {
|
||||
}
|
||||
}
|
||||
|
||||
private fun applySlice(radius: Float, topRect: Boolean, bottomRect: Boolean,
|
||||
topShadow: Boolean, bottomShadow: Boolean) {
|
||||
private fun applySlice(
|
||||
radius: Float,
|
||||
topRect: Boolean,
|
||||
bottomRect: Boolean,
|
||||
topShadow: Boolean,
|
||||
bottomShadow: Boolean
|
||||
) {
|
||||
val margin = margin
|
||||
|
||||
slice.setRadius(radius)
|
||||
@@ -62,5 +67,4 @@ interface SlicedHolder {
|
||||
|
||||
val margin
|
||||
get() = 8.dpToPx
|
||||
|
||||
}
|
||||
|
||||
@@ -66,5 +66,4 @@ open class BasePresenter<V> : RxPresenter<V>() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,5 +43,4 @@ class NucleusConductorDelegate<P : Presenter<*>>(private val factory: PresenterF
|
||||
fun onDestroy() {
|
||||
presenter?.destroy()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-1
@@ -29,5 +29,4 @@ class NucleusConductorLifecycleListener(private val delegate: NucleusConductorDe
|
||||
companion object {
|
||||
private const val PRESENTER_STATE_KEY = "presenter_state"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user