aboutsummaryrefslogtreecommitdiff
path: root/libdino
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-10-18 14:10:50 +0200
committerMarvin W <git@larma.de>2019-10-18 14:10:50 +0200
commit7d561ddfab88f676d2b49d8a7a7bc5dd30d1f41f (patch)
tree6692274c613ad3d58a82861c046b0645f8cd112e /libdino
parentf34aa58626980e199b9e68532661c3ed0487771a (diff)
downloaddino-7d561ddfab88f676d2b49d8a7a7bc5dd30d1f41f.tar.gz
dino-7d561ddfab88f676d2b49d8a7a7bc5dd30d1f41f.zip
Allow to run Dino as background service
Diffstat (limited to 'libdino')
-rw-r--r--libdino/src/application.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdino/src/application.vala b/libdino/src/application.vala
index da098fb4..55bf950c 100644
--- a/libdino/src/application.vala
+++ b/libdino/src/application.vala
@@ -111,10 +111,12 @@ public interface Dino.Application : GLib.Application {
}
protected void add_connection(Account account) {
+ if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) hold();
stream_interactor.connect_account(account);
}
protected void remove_connection(Account account) {
+ if ((get_flags() & ApplicationFlags.IS_SERVICE) == ApplicationFlags.IS_SERVICE) release();
stream_interactor.disconnect_account(account);
}