From f12fc371a3bd00ac8c3183099d9d54528ef46bf0 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 21 Jan 2021 15:39:36 +0100 Subject: Make spell checking a setting, store language per conversation --- libdino/src/entity/settings.vala | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libdino/src/entity') 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; + } + } } } -- cgit v1.2.3-70-g09d2