aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/account_settings_widget.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-10-28 23:48:07 +0200
committerfiaxh <git@mx.ax.lt>2017-10-31 15:41:45 +0100
commitb9df78e4494879752e9e68dcc5d54e03fffe9467 (patch)
treed1c74fde4aedea42773bc411c557f2184003defa /plugins/omemo/src/account_settings_widget.vala
parentd9b91206c0291fa8aa58df572292784a4f8ff878 (diff)
downloaddino-b9df78e4494879752e9e68dcc5d54e03fffe9467.tar.gz
dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.zip
Move DatabaseError handling into Qlite
Diffstat (limited to 'plugins/omemo/src/account_settings_widget.vala')
-rw-r--r--plugins/omemo/src/account_settings_widget.vala20
1 files changed, 8 insertions, 12 deletions
diff --git a/plugins/omemo/src/account_settings_widget.vala b/plugins/omemo/src/account_settings_widget.vala
index da3f6ca2..cec0eecd 100644
--- a/plugins/omemo/src/account_settings_widget.vala
+++ b/plugins/omemo/src/account_settings_widget.vala
@@ -36,17 +36,13 @@ public class AccountSettingWidget : Plugins.AccountSettingsWidget, Box {
public void set_account(Account account) {
this.account = account;
btn.visible = false;
- try {
- Qlite.Row? row = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id).inner;
- if (row == null) {
- fingerprint.set_markup("%s\n<span font='8'>%s</span>".printf(_("Own fingerprint"), _("Will be generated on first connect")));
- } else {
- string res = fingerprint_markup(fingerprint_from_base64(((!)row)[plugin.db.identity.identity_key_public_base64]));
- fingerprint.set_markup("%s\n<span font_family='monospace' font='8'>%s</span>".printf(_("Own fingerprint"), res));
- btn.visible = true;
- }
- } catch (Qlite.DatabaseError e) {
- fingerprint.set_markup("%s\n<span font='8'>%s</span>".printf(_("Own fingerprint"), _("Database error")));
+ Qlite.Row? row = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id).inner;
+ if (row == null) {
+ fingerprint.set_markup("%s\n<span font='8'>%s</span>".printf(_("Own fingerprint"), _("Will be generated on first connect")));
+ } else {
+ string res = fingerprint_markup(fingerprint_from_base64(((!)row)[plugin.db.identity.identity_key_public_base64]));
+ fingerprint.set_markup("%s\n<span font_family='monospace' font='8'>%s</span>".printf(_("Own fingerprint"), res));
+ btn.visible = true;
}
}
@@ -54,4 +50,4 @@ public class AccountSettingWidget : Plugins.AccountSettingsWidget, Box {
}
}
-} \ No newline at end of file
+}