|
|
@ -182,7 +182,7 @@ class ChaptersFragment : BaseRxFragment<ChaptersPresenter>(), ActionMode.Callbac
|
|
|
|
initialFetchChapters()
|
|
|
|
initialFetchChapters()
|
|
|
|
|
|
|
|
|
|
|
|
destroyActionModeIfNeeded()
|
|
|
|
destroyActionModeIfNeeded()
|
|
|
|
adapter.setItems(chapters)
|
|
|
|
adapter.items = chapters
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun initialFetchChapters() {
|
|
|
|
private fun initialFetchChapters() {
|
|
|
@ -360,7 +360,11 @@ class ChaptersFragment : BaseRxFragment<ChaptersPresenter>(), ActionMode.Callbac
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun markPreviousAsRead(chapter: ChapterModel) {
|
|
|
|
fun markPreviousAsRead(chapter: ChapterModel) {
|
|
|
|
presenter.markPreviousChaptersAsRead(chapter)
|
|
|
|
val chapters = if (presenter.sortDescending()) adapter.items.reversed() else adapter.items
|
|
|
|
|
|
|
|
val chapterPos = chapters.indexOf(chapter)
|
|
|
|
|
|
|
|
if (chapterPos != -1) {
|
|
|
|
|
|
|
|
presenter.markChaptersRead(chapters.take(chapterPos), true)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fun downloadChapters(chapters: List<ChapterModel>) {
|
|
|
|
fun downloadChapters(chapters: List<ChapterModel>) {
|
|
|
|