diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-08-27 11:52:27 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-08-27 11:53:14 -0400 |
| commit | 09891ea2f392bad30f4fd4a0cf6f6098ca5c1b4f (patch) | |
| tree | d357140a6533fd845ba49451df53bd7086d8055a /libdino/src | |
| parent | b308e9f032f1f6013f8dd0ec563777638d97743e (diff) | |
feat: add custom css field to preferences
Diffstat (limited to 'libdino/src')
| -rw-r--r-- | libdino/src/entity/settings.vala | 13 |
1 files changed, 13 insertions, 0 deletions
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) { |
