mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 19:55:11 +01:00
Cleanup secondary drawer
This commit is contained in:
parent
6a22c18fab
commit
6ee80d2a2b
@ -1,11 +0,0 @@
|
||||
package eu.kanade.tachiyomi.ui.base.controller
|
||||
|
||||
import android.view.ViewGroup
|
||||
import androidx.drawerlayout.widget.DrawerLayout
|
||||
|
||||
interface SecondaryDrawerController {
|
||||
|
||||
fun createSecondaryDrawer(drawer: androidx.drawerlayout.widget.DrawerLayout): ViewGroup?
|
||||
|
||||
fun cleanupSecondaryDrawer(drawer: DrawerLayout)
|
||||
}
|
@ -43,13 +43,13 @@ import eu.kanade.tachiyomi.util.view.updateLayoutParams
|
||||
import eu.kanade.tachiyomi.util.view.visible
|
||||
import eu.kanade.tachiyomi.util.view.visibleIf
|
||||
import eu.kanade.tachiyomi.widget.AutofitRecyclerView
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlinx.android.synthetic.main.catalogue_controller.*
|
||||
import rx.Observable
|
||||
import rx.Subscription
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import timber.log.Timber
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
/**
|
||||
* Controller to manage the catalogues available in the app.
|
||||
|
@ -82,8 +82,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
||||
private var currentGestureDelegate: SwipeGestureInterface? = null
|
||||
private lateinit var gestureDetector: GestureDetectorCompat
|
||||
|
||||
private var secondaryDrawer: ViewGroup? = null
|
||||
|
||||
private var snackBar: Snackbar? = null
|
||||
private var extraViewForUndo: View? = null
|
||||
private var canDismissSnackBar = false
|
||||
@ -547,21 +545,6 @@ open class MainActivity : BaseActivity(), DownloadServiceListener {
|
||||
|
||||
currentGestureDelegate = to as? SwipeGestureInterface
|
||||
|
||||
/*if (from is SecondaryDrawerController) {
|
||||
if (secondaryDrawer != null) {
|
||||
from.cleanupSecondaryDrawer(drawer)
|
||||
drawer.removeView(secondaryDrawer)
|
||||
secondaryDrawer = null
|
||||
}
|
||||
}
|
||||
if (to is SecondaryDrawerController) {
|
||||
val newDrawer = to.createSecondaryDrawer(drawer)?.also { drawer.addView(it) }
|
||||
secondaryDrawer = if (newDrawer == null && secondaryDrawer != null) {
|
||||
drawer.removeView(secondaryDrawer)
|
||||
null
|
||||
} else newDrawer
|
||||
}*/
|
||||
|
||||
if (to !is SpinnerTitleInterface) toolbar.removeSpinner()
|
||||
|
||||
if (to !is DialogController) {
|
||||
|
Loading…
Reference in New Issue
Block a user