revert things change unexpectedly

pull/1282/head
Jason Yao 3 years ago
parent 1967e3fb8d
commit fff1160df5
  1. 4
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt

@ -237,7 +237,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
o1.bookSourceName.cnCompare(o2.bookSourceName) o1.bookSourceName.cnCompare(o2.bookSourceName)
} }
Sort.Url -> data.sortedBy { it.bookSourceUrl } Sort.Url -> data.sortedBy { it.bookSourceUrl }
Sort.Update -> data.sortedBy { it.lastUpdateTime } Sort.Update -> data.sortedByDescending { it.lastUpdateTime }
Sort.Respond -> data.sortedBy { it.respondTime } Sort.Respond -> data.sortedBy { it.respondTime }
Sort.Enable -> data.sortedWith { o1, o2 -> Sort.Enable -> data.sortedWith { o1, o2 ->
var sort = -o1.enabled.compareTo(o2.enabled) var sort = -o1.enabled.compareTo(o2.enabled)
@ -254,7 +254,7 @@ class BookSourceActivity : VMBaseActivity<ActivityBookSourceBinding, BookSourceV
o2.bookSourceName.cnCompare(o1.bookSourceName) o2.bookSourceName.cnCompare(o1.bookSourceName)
} }
Sort.Url -> data.sortedByDescending { it.bookSourceUrl } Sort.Url -> data.sortedByDescending { it.bookSourceUrl }
Sort.Update -> data.sortedByDescending { it.lastUpdateTime } Sort.Update -> data.sortedBy { it.lastUpdateTime }
Sort.Respond -> data.sortedByDescending { it.respondTime } Sort.Respond -> data.sortedByDescending { it.respondTime }
Sort.Enable -> data.sortedWith { o1, o2 -> Sort.Enable -> data.sortedWith { o1, o2 ->
var sort = o1.enabled.compareTo(o2.enabled) var sort = o1.enabled.compareTo(o2.enabled)

Loading…
Cancel
Save