mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 21:03:13 +02:00
Fixing D&D sorting sometimes giving a blank library
This commit is contained in:
parent
b212f8233e
commit
750c515db8
@ -275,6 +275,7 @@ class LibraryPresenter(
|
|||||||
val index1 = order.indexOf(i1.manga.id!!)
|
val index1 = order.indexOf(i1.manga.id!!)
|
||||||
val index2 = order.indexOf(i2.manga.id!!)
|
val index2 = order.indexOf(i2.manga.id!!)
|
||||||
when {
|
when {
|
||||||
|
index1 == index2 -> 0
|
||||||
index1 == -1 -> -1
|
index1 == -1 -> -1
|
||||||
index2 == -1 -> 1
|
index2 == -1 -> 1
|
||||||
else -> index1.compareTo(index2)
|
else -> index1.compareTo(index2)
|
||||||
|
@ -392,7 +392,7 @@ open class MainActivity : BaseActivity() {
|
|||||||
drawer.closeDrawers()
|
drawer.closeDrawers()
|
||||||
} else if (backstackSize == 1 && router.getControllerWithTag("$startScreenId") == null) {
|
} else if (backstackSize == 1 && router.getControllerWithTag("$startScreenId") == null) {
|
||||||
setSelectedDrawerItem(startScreenId)
|
setSelectedDrawerItem(startScreenId)
|
||||||
} else if (backstackSize == 1 || !router.handleBack()) {
|
} else if (!router.handleBack()) {
|
||||||
unlocked = false
|
unlocked = false
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user