Fixing D&D sorting sometimes giving a blank library

This commit is contained in:
Jay 2020-02-08 01:25:34 -08:00
parent b212f8233e
commit 750c515db8
2 changed files with 2 additions and 1 deletions

View File

@ -275,6 +275,7 @@ class LibraryPresenter(
val index1 = order.indexOf(i1.manga.id!!)
val index2 = order.indexOf(i2.manga.id!!)
when {
index1 == index2 -> 0
index1 == -1 -> -1
index2 == -1 -> 1
else -> index1.compareTo(index2)

View File

@ -392,7 +392,7 @@ open class MainActivity : BaseActivity() {
drawer.closeDrawers()
} else if (backstackSize == 1 && router.getControllerWithTag("$startScreenId") == null) {
setSelectedDrawerItem(startScreenId)
} else if (backstackSize == 1 || !router.handleBack()) {
} else if (!router.handleBack()) {
unlocked = false
super.onBackPressed()
}