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