更新目录界面
添加目录界面的长按功能:全选、反选、选择已选章节之后章节、添加书签、下载
This commit is contained in:
20 files changed
+523
-205
No files matched your search
@@ -71,13 +71,12 @@ object CacheBook {
|
||||
}
|
||||
}
|
||||
|
||||
fun start(context: Context, book: Book, start: Int, end: Int) {
|
||||
if (!book.isLocal) {
|
||||
fun start(context: Context, book: Book, selectedIndices: List<Int>) {
|
||||
if (!book.isLocal && selectedIndices.isNotEmpty()) {
|
||||
context.startService<CacheBookService> {
|
||||
action = IntentAction.start
|
||||
putExtra("bookUrl", book.bookUrl)
|
||||
putExtra("start", start)
|
||||
putExtra("end", end)
|
||||
putIntegerArrayListExtra("indices", ArrayList(selectedIndices))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,6 +183,10 @@ object CacheBook {
|
||||
postEvent(EventBus.UP_DOWNLOAD, book.bookUrl)
|
||||
}
|
||||
|
||||
fun addDownload(index: Int) {
|
||||
addDownload(index, index)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
private fun onSuccess(chapter: BookChapter) {
|
||||
onDownloadSet.remove(chapter.index)
|
||||
|
||||
Reference in new issue
Block a user