|
|
|
@ -6,8 +6,8 @@ import androidx.room.Entity |
|
|
|
|
import androidx.room.Ignore |
|
|
|
|
import androidx.room.Index |
|
|
|
|
import androidx.room.PrimaryKey |
|
|
|
|
import com.google.gson.Gson |
|
|
|
|
import io.legado.app.constant.AppConst.NOT_AVAILABLE |
|
|
|
|
import io.legado.app.utils.GSON |
|
|
|
|
import io.legado.app.utils.fromJson |
|
|
|
|
import kotlinx.android.parcel.IgnoredOnParcel |
|
|
|
|
import kotlinx.android.parcel.Parcelize |
|
|
|
@ -69,7 +69,7 @@ data class Book( |
|
|
|
|
variableMap = if (isEmpty(variable)) { |
|
|
|
|
HashMap() |
|
|
|
|
} else { |
|
|
|
|
Gson().fromJson<HashMap<String, String>>(variable!!) |
|
|
|
|
GSON.fromJson<HashMap<String, String>>(variable!!) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -77,6 +77,6 @@ data class Book( |
|
|
|
|
override fun putVariable(key: String, value: String) { |
|
|
|
|
initVariableMap() |
|
|
|
|
variableMap?.put(key, value) |
|
|
|
|
variable = Gson().toJson(variableMap) |
|
|
|
|
variable = GSON.toJson(variableMap) |
|
|
|
|
} |
|
|
|
|
} |