mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(library): Accidentally swap global open random manga with non-global
This commit is contained in:
parent
a4a7f8fb6d
commit
cf06ebdb8b
2 changed files with 8 additions and 2 deletions
|
@ -521,9 +521,9 @@ open class LibraryController(
|
||||||
|
|
||||||
private fun openRandomManga(global: Boolean) {
|
private fun openRandomManga(global: Boolean) {
|
||||||
val items = if (global) {
|
val items = if (global) {
|
||||||
adapter.currentItems
|
|
||||||
} else {
|
|
||||||
presenter.allLibraryItems
|
presenter.allLibraryItems
|
||||||
|
} else {
|
||||||
|
adapter.currentItems
|
||||||
}.filter { (it is LibraryItem && !it.manga.isBlank() && !it.manga.isHidden() && (!it.manga.initialized || it.manga.unread > 0)) }
|
}.filter { (it is LibraryItem && !it.manga.isBlank() && !it.manga.isHidden() && (!it.manga.initialized || it.manga.unread > 0)) }
|
||||||
if (items.isNotEmpty()) {
|
if (items.isNotEmpty()) {
|
||||||
val item = items.random() as LibraryItem
|
val item = items.random() as LibraryItem
|
||||||
|
|
|
@ -86,3 +86,9 @@ WHERE _id = :mangaId;
|
||||||
|
|
||||||
selectLastInsertedRowId:
|
selectLastInsertedRowId:
|
||||||
SELECT last_insert_rowid();
|
SELECT last_insert_rowid();
|
||||||
|
|
||||||
|
deleteNotInLibraryAndNotReadBySourceIds:
|
||||||
|
DELETE FROM mangas
|
||||||
|
WHERE favorite = :favorite AND source IN :sourceIds AND _id NOT IN (
|
||||||
|
SELECT chapters.manga_id FROM chapters WHERE read = 1 OR last_page_read != 0
|
||||||
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue