pull/1259/head
gedoor 3 years ago
parent fd8ac3ed1d
commit 1c4dcf7532
  1. 13
      app/src/main/java/io/legado/app/data/entities/BookProgress.kt
  2. 9
      app/src/main/java/io/legado/app/help/storage/BookWebDav.kt
  3. 2
      build.gradle

@ -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…
Cancel
Save