|
|
|
@ -88,6 +88,7 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private fun searchFinish(searchBook: SearchBook) { |
|
|
|
|
if (searchBooks.contains(searchBook)) return |
|
|
|
|
App.db.searchBookDao.insert(searchBook) |
|
|
|
|
if (screenKey.isEmpty()) { |
|
|
|
|
searchBooks.add(searchBook) |
|
|
|
@ -140,7 +141,6 @@ class ChangeSourceViewModel(application: Application) : BaseViewModel(applicatio |
|
|
|
|
} else { |
|
|
|
|
searchFinish(searchBook) |
|
|
|
|
} |
|
|
|
|
return@onSuccess |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|