mirror of
https://github.com/gedoor/legado.git
synced 2024-07-19 01:17:25 +08:00
优化
This commit is contained in:
parent
fd8ac3ed1d
commit
1c4dcf7532
@ -7,4 +7,15 @@ data class BookProgress(
|
||||
val durChapterPos: Int,
|
||||
val durChapterTime: Long,
|
||||
val durChapterTitle: String?
|
||||
)
|
||||
) {
|
||||
|
||||
constructor(book: Book) : this(
|
||||
name = book.name,
|
||||
author = book.author,
|
||||
durChapterIndex = book.durChapterIndex,
|
||||
durChapterPos = book.durChapterPos,
|
||||
durChapterTime = book.durChapterTime,
|
||||
durChapterTitle = book.durChapterTitle
|
||||
)
|
||||
|
||||
}
|
@ -141,14 +141,7 @@ object BookWebDav {
|
||||
fun uploadBookProgress(book: Book) {
|
||||
if (!NetworkUtils.isAvailable()) return
|
||||
Coroutine.async {
|
||||
val bookProgress = BookProgress(
|
||||
name = book.name,
|
||||
author = book.author,
|
||||
durChapterIndex = book.durChapterIndex,
|
||||
durChapterPos = book.durChapterPos,
|
||||
durChapterTime = book.durChapterTime,
|
||||
durChapterTitle = book.durChapterTitle
|
||||
)
|
||||
val bookProgress = BookProgress(book)
|
||||
val json = GSON.toJson(bookProgress)
|
||||
val url = getProgressUrl(book)
|
||||
if (initWebDav()) {
|
||||
|
@ -10,7 +10,7 @@ buildscript {
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.0'
|
||||
classpath 'com.android.tools.build:gradle:7.0.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'de.timfreiheit.resourceplaceholders:placeholders:0.4'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user