Cleanup secondary drawer

This commit is contained in:
Jay 2020-03-22 19:09:48 -04:00
parent 6a22c18fab
commit 6ee80d2a2b
3 changed files with 1 additions and 29 deletions

View File

@ -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)
}

View File

@ -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.

View File

@ -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) {