Fix restoring quick actions

This commit is contained in:
MM20 2023-02-20 17:03:42 +01:00
parent 295f1e54ca
commit 1ba1eacd89
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -144,9 +144,9 @@ internal class SearchActionRepositoryImpl(
val entity = SearchActionEntity(
position = json.getInt("position"),
data = json.getString("data"),
data = json.optString("data").takeIf { it.isNotEmpty() },
color = json.optInt("color", 0),
label = json.getString("label"),
label = json.optString("label").takeIf { it.isNotEmpty() },
icon = json.optInt("icon", 0),
customIcon = iconFile?.absolutePath,
options = json.optString("options").takeIf { it.isNotEmpty() },