From 0d2a4db3f701107381db349a475b0f50466bbf10 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 11 Jul 2018 09:46:51 +0200 Subject: [PATCH] Only pull for new messages if the session is allowed to be kept alive Signed-off-by: Joas Schilling --- js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 99908a4d2..305ab1bcc 100644 --- a/js/app.js +++ b/js/app.js @@ -104,7 +104,9 @@ this.$container.on('click', '.notification-delete', _.bind(this._onClickDismissNotification, this)); // Setup the background checker - this.interval = setInterval(_.bind(this.backgroundFetch, this), this.pollInterval); + if (oc_config.session_keepalive) { + this.interval = setInterval(_.bind(this.backgroundFetch, this), this.pollInterval); + } }, /**