diff options
author | fiaxh <git@lightrise.org> | 2021-01-21 15:39:36 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-01-21 15:51:41 +0100 |
commit | f12fc371a3bd00ac8c3183099d9d54528ef46bf0 (patch) | |
tree | 84cf27c7ed59372338bb43b45aa35027ff69ad23 /libdino/src/entity | |
parent | 0d3070643884b0a8d960058d1df4d6cd07f9ec84 (diff) | |
download | dino-f12fc371a3bd00ac8c3183099d9d54528ef46bf0.tar.gz dino-f12fc371a3bd00ac8c3183099d9d54528ef46bf0.zip |
Make spell checking a setting, store language per conversation
Diffstat (limited to 'libdino/src/entity')
-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 2aae6055..97ea5482 100644 --- a/libdino/src/entity/settings.vala +++ b/libdino/src/entity/settings.vala @@ -11,6 +11,7 @@ public class Settings : Object { send_marker_ = col_to_bool_or_default("send_marker", true); notifications_ = col_to_bool_or_default("notifications", true); convert_utf8_smileys_ = col_to_bool_or_default("convert_utf8_smileys", true); + check_spelling = col_to_bool_or_default("check_spelling", true); } private bool col_to_bool_or_default(string key, bool def) { @@ -65,6 +66,18 @@ public class Settings : Object { convert_utf8_smileys_ = value; } } + + private bool check_spelling_; + public bool check_spelling { + get { return check_spelling_; } + set { + db.settings.upsert() + .value(db.settings.key, "check_spelling", true) + .value(db.settings.value, value.to_string()) + .perform(); + check_spelling_ = value; + } + } } } |