|
|
@ -144,7 +144,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application), |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!scope.isActive) return |
|
|
|
if (!scope.isActive) return |
|
|
|
searchBooks.sortWith(Comparator { o1, o2 -> |
|
|
|
searchBooks.sortWith { o1, o2 -> |
|
|
|
if (o1.name == searchKey && o2.name != searchKey) { |
|
|
|
if (o1.name == searchKey && o2.name != searchKey) { |
|
|
|
1 |
|
|
|
1 |
|
|
|
} else if (o1.name != searchKey && o2.name == searchKey) { |
|
|
|
} else if (o1.name != searchKey && o2.name == searchKey) { |
|
|
@ -168,7 +168,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application), |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
0 |
|
|
|
0 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
if (!scope.isActive) return |
|
|
|
if (!scope.isActive) return |
|
|
|
searchBooks = copyDataS |
|
|
|
searchBooks = copyDataS |
|
|
|
upAdapter() |
|
|
|
upAdapter() |
|
|
|