|
|
|
@ -71,14 +71,15 @@ data class Book( |
|
|
|
|
return bookUrl.hashCode() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Ignore |
|
|
|
|
@delegate:Ignore |
|
|
|
|
@IgnoredOnParcel |
|
|
|
|
override var variableMap: HashMap<String, String>? = null |
|
|
|
|
get() { |
|
|
|
|
if (field == null) { |
|
|
|
|
field = GSON.fromJsonObject<HashMap<String, String>>(variable) ?: HashMap() |
|
|
|
|
override val variableMap by lazy { |
|
|
|
|
GSON.fromJsonObject<HashMap<String, String>>(variable) ?: HashMap() |
|
|
|
|
} |
|
|
|
|
return field |
|
|
|
|
|
|
|
|
|
override fun putVariable(key: String, value: String) { |
|
|
|
|
variableMap[key] = value |
|
|
|
|
variable = GSON.toJson(variableMap) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Ignore |
|
|
|
@ -97,11 +98,6 @@ data class Book( |
|
|
|
|
|
|
|
|
|
fun getDisplayIntro() = if (customIntro.isNullOrEmpty()) intro else customIntro |
|
|
|
|
|
|
|
|
|
override fun putVariable(key: String, value: String) { |
|
|
|
|
variableMap?.put(key, value) |
|
|
|
|
variable = GSON.toJson(variableMap) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fun fileCharset(): Charset { |
|
|
|
|
return charset(charset ?: "UTF-8") |
|
|
|
|
} |
|
|
|
|