diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-22 17:15:06 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-23 14:36:53 +0100 |
commit | fa78573b052693b29350bdd0f7eaf74dc6571e4a (patch) | |
tree | 7efcb3eb96e5c3d17c6a1c0604eff533e1244a20 /main/src/ui/manage_accounts/dialog.vala | |
parent | ec06d5f9ebd7142f4be422e73b46d6702671927d (diff) | |
download | dino-fa78573b052693b29350bdd0f7eaf74dc6571e4a.tar.gz dino-fa78573b052693b29350bdd0f7eaf74dc6571e4a.zip |
Move some database interaction into entities
fixes #2
Diffstat (limited to 'main/src/ui/manage_accounts/dialog.vala')
-rw-r--r-- | main/src/ui/manage_accounts/dialog.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala index db40761d..c0689474 100644 --- a/main/src/ui/manage_accounts/dialog.vala +++ b/main/src/ui/manage_accounts/dialog.vala @@ -98,7 +98,7 @@ public class Dialog : Gtk.Window { AddAccountDialog add_account_dialog = new AddAccountDialog(stream_interactor); add_account_dialog.set_transient_for(this); add_account_dialog.added.connect((account) => { - db.add_account(account); + account.persist(db); AccountRow account_item = add_account(account); account_list.select_row(account_item); account_list.queue_draw(); @@ -112,7 +112,7 @@ public class Dialog : Gtk.Window { account_list.remove(account_item); account_list.queue_draw(); if (account_item.account.enabled) account_disabled(account_item.account); - db.remove_account(account_item.account); + account_item.account.remove(); if (account_list.get_row_at_index(0) != null) { account_list.select_row(account_list.get_row_at_index(0)); } else { |