|
|
@ -191,12 +191,7 @@ object ReadBook { |
|
|
|
if (book != null && textChapter != null) { |
|
|
|
if (book != null && textChapter != null) { |
|
|
|
val key = IntentDataHelp.putData(textChapter) |
|
|
|
val key = IntentDataHelp.putData(textChapter) |
|
|
|
ReadAloud.play( |
|
|
|
ReadAloud.play( |
|
|
|
App.INSTANCE, |
|
|
|
App.INSTANCE, book.name, textChapter.title, durPageIndex, key, play |
|
|
|
book.name, |
|
|
|
|
|
|
|
textChapter.title, |
|
|
|
|
|
|
|
durPageIndex, |
|
|
|
|
|
|
|
key, |
|
|
|
|
|
|
|
play |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -275,10 +270,7 @@ object ReadBook { |
|
|
|
CacheBook.download(webBook, book, chapter) |
|
|
|
CacheBook.download(webBook, book, chapter) |
|
|
|
} else if (book != null) { |
|
|
|
} else if (book != null) { |
|
|
|
contentLoadFinish( |
|
|
|
contentLoadFinish( |
|
|
|
book, |
|
|
|
book, chapter, "没有书源", resetPageOffset = resetPageOffset |
|
|
|
chapter, |
|
|
|
|
|
|
|
"没有书源", |
|
|
|
|
|
|
|
resetPageOffset = resetPageOffset |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
removeLoading(chapter.index) |
|
|
|
removeLoading(chapter.index) |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -383,11 +375,7 @@ object ReadBook { |
|
|
|
durChapterIndex -> { |
|
|
|
durChapterIndex -> { |
|
|
|
curTextChapter = |
|
|
|
curTextChapter = |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
book, |
|
|
|
book, chapter, contents, chapterSize, imageStyle |
|
|
|
chapter, |
|
|
|
|
|
|
|
contents, |
|
|
|
|
|
|
|
chapterSize, |
|
|
|
|
|
|
|
imageStyle |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
if (upContent) callBack?.upContent(resetPageOffset = resetPageOffset) |
|
|
|
if (upContent) callBack?.upContent(resetPageOffset = resetPageOffset) |
|
|
|
callBack?.upView() |
|
|
|
callBack?.upView() |
|
|
@ -397,22 +385,14 @@ object ReadBook { |
|
|
|
durChapterIndex - 1 -> { |
|
|
|
durChapterIndex - 1 -> { |
|
|
|
prevTextChapter = |
|
|
|
prevTextChapter = |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
book, |
|
|
|
book, chapter, contents, chapterSize, imageStyle |
|
|
|
chapter, |
|
|
|
|
|
|
|
contents, |
|
|
|
|
|
|
|
chapterSize, |
|
|
|
|
|
|
|
imageStyle |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
if (upContent) callBack?.upContent(-1, resetPageOffset) |
|
|
|
if (upContent) callBack?.upContent(-1, resetPageOffset) |
|
|
|
} |
|
|
|
} |
|
|
|
durChapterIndex + 1 -> { |
|
|
|
durChapterIndex + 1 -> { |
|
|
|
nextTextChapter = |
|
|
|
nextTextChapter = |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
ChapterProvider.getTextChapter( |
|
|
|
book, |
|
|
|
book, chapter, contents, chapterSize, imageStyle |
|
|
|
chapter, |
|
|
|
|
|
|
|
contents, |
|
|
|
|
|
|
|
chapterSize, |
|
|
|
|
|
|
|
imageStyle |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
if (upContent) callBack?.upContent(1, resetPageOffset) |
|
|
|
if (upContent) callBack?.upContent(1, resetPageOffset) |
|
|
|
} |
|
|
|
} |
|
|
|