pull/48/head
kunfei 5 years ago
parent f15e46bc03
commit 74993fb737
  1. 6
      app/src/main/java/io/legado/app/help/storage/OldRule.kt

@ -75,8 +75,12 @@ object OldRule {
nextTocUrl = jsonItem.readString("ruleChapterUrlNext") nextTocUrl = jsonItem.readString("ruleChapterUrlNext")
) )
ruleToc = GSON.toJson(chapterRule) ruleToc = GSON.toJson(chapterRule)
var content = jsonItem.readString("ruleBookContent") ?: ""
if (content.startsWith("$") && !content.startsWith("$.")) {
content = content.substring(1)
}
val contentRule = ContentRule( val contentRule = ContentRule(
content = jsonItem.readString("ruleBookContent"), content = content,
nextContentUrl = jsonItem.readString("ruleContentUrlNext") nextContentUrl = jsonItem.readString("ruleContentUrlNext")
) )
ruleContent = GSON.toJson(contentRule) ruleContent = GSON.toJson(contentRule)

Loading…
Cancel
Save