|
|
@ -122,11 +122,9 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
exportMsg[book.bookUrl] = context.getString(R.string.export_success) |
|
|
|
exportMsg[book.bookUrl] = context.getString(R.string.export_success) |
|
|
|
upAdapterLiveData.postValue(book.bookUrl) |
|
|
|
upAdapterLiveData.postValue(book.bookUrl) |
|
|
|
}.onFinally { |
|
|
|
}.onFinally { |
|
|
|
mutex.withLock { |
|
|
|
|
|
|
|
exportNumber-- |
|
|
|
exportNumber-- |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Suppress("BlockingMethodInNonBlockingContext") |
|
|
|
@Suppress("BlockingMethodInNonBlockingContext") |
|
|
|
private suspend fun export(doc: DocumentFile, book: Book) { |
|
|
|
private suspend fun export(doc: DocumentFile, book: Book) { |
|
|
@ -287,11 +285,9 @@ class CacheViewModel(application: Application) : BaseViewModel(application) { |
|
|
|
exportMsg[book.bookUrl] = context.getString(R.string.export_success) |
|
|
|
exportMsg[book.bookUrl] = context.getString(R.string.export_success) |
|
|
|
upAdapterLiveData.postValue(book.bookUrl) |
|
|
|
upAdapterLiveData.postValue(book.bookUrl) |
|
|
|
}.onFinally { |
|
|
|
}.onFinally { |
|
|
|
mutex.withLock { |
|
|
|
|
|
|
|
exportNumber-- |
|
|
|
exportNumber-- |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Suppress("BlockingMethodInNonBlockingContext") |
|
|
|
@Suppress("BlockingMethodInNonBlockingContext") |
|
|
|
private suspend fun exportEpub(doc: DocumentFile, book: Book) { |
|
|
|
private suspend fun exportEpub(doc: DocumentFile, book: Book) { |
|
|
|