mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
ReaderPresenter: fix formating
This commit is contained in:
parent
67b3c0b3b0
commit
b03e907f7c
1 changed files with 7 additions and 2 deletions
|
@ -213,7 +213,11 @@ class ReaderPresenter(
|
|||
chapterItems = withContext(Dispatchers.IO) {
|
||||
val chapterSort = ChapterSort(manga, chapterFilter, preferences)
|
||||
val dbChapters = db.getChapters(manga).executeAsBlocking()
|
||||
chapterSort.getChaptersSorted(dbChapters, filterForReader = true, currentChapter = getCurrentChapter()?.chapter).map {
|
||||
chapterSort.getChaptersSorted(
|
||||
dbChapters,
|
||||
filterForReader = true,
|
||||
currentChapter = getCurrentChapter()?.chapter
|
||||
).map {
|
||||
ReaderChapterItem(
|
||||
it,
|
||||
manga,
|
||||
|
@ -350,7 +354,8 @@ class ReaderPresenter(
|
|||
val id = db.insertManga(manga).executeOnIO().insertedId()
|
||||
manga.id = id ?: manga.id
|
||||
chapter.manga_id = manga.id
|
||||
val matchingChapterId = db.getChapters(manga).executeOnIO().find { it.url == chapter.url }?.id
|
||||
val matchingChapterId =
|
||||
db.getChapters(manga).executeOnIO().find { it.url == chapter.url }?.id
|
||||
if (matchingChapterId != null) {
|
||||
withContext(Dispatchers.Main) {
|
||||
this@ReaderPresenter.init(manga, matchingChapterId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue