|
|
|
@ -31,7 +31,11 @@ fun HistoryInfo(
|
|
|
|
history: MangaHistory?,
|
|
|
|
history: MangaHistory?,
|
|
|
|
isIncognitoMode: Boolean
|
|
|
|
isIncognitoMode: Boolean
|
|
|
|
): HistoryInfo {
|
|
|
|
): HistoryInfo {
|
|
|
|
val chapters = manga?.chapters?.get(branch)
|
|
|
|
val chapters = if (manga?.chapters?.isEmpty() == true) {
|
|
|
|
|
|
|
|
emptyList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
manga?.chapters?.get(branch)
|
|
|
|
|
|
|
|
}
|
|
|
|
val currentChapter = if (history != null && !chapters.isNullOrEmpty()) {
|
|
|
|
val currentChapter = if (history != null && !chapters.isNullOrEmpty()) {
|
|
|
|
chapters.indexOfFirst { it.id == history.chapterId }
|
|
|
|
chapters.indexOfFirst { it.id == history.chapterId }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|