From 09891ea2f392bad30f4fd4a0cf6f6098ca5c1b4f Mon Sep 17 00:00:00 2001 From: frosty Date: Thu, 27 Aug 2026 11:52:27 -0400 Subject: feat: add custom css field to preferences --- libdino/src/entity/settings.vala | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libdino') diff --git a/libdino/src/entity/settings.vala b/libdino/src/entity/settings.vala index 1e78c2ba..d03bb39f 100644 --- a/libdino/src/entity/settings.vala +++ b/libdino/src/entity/settings.vala @@ -23,6 +23,7 @@ public class Settings : Object { convert_utf8_smileys_ = col_to_bool_or_default("convert_utf8_smileys", true); check_spelling = col_to_bool_or_default("check_spelling", true); avatar_roundness_ = col_to_int_or_default("avatar_roundness", 20).clamp(0, 100); + custom_css_ = db.settings.select({db.settings.value}).with(db.settings.key, "=", "custom_css")[db.settings.value] ?? ""; } private bool col_to_bool_or_default(string key, bool def) { @@ -206,6 +207,18 @@ public class Settings : Object { } } + private string custom_css_; + public string custom_css { + get { return custom_css_; } + set { + db.settings.upsert() + .value(db.settings.key, "custom_css", true) + .value(db.settings.value, value) + .perform(); + custom_css_ = value; + } + } + public Encryption get_default_encryption(Account account) { string? setting = db.account_settings.get_value(account.id, "default-encryption"); if (setting != null) { -- cgit v1.3