Also remove failure notification if no update is available

* error happened and vanished the notification should also
  vanish even if no update is available

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-03-17 14:40:39 -06:00 committed by Roeland Jago Douma
parent 3668673d7b
commit 2249c77a06
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 2 deletions

View File

@ -98,11 +98,13 @@ class BackgroundJob extends TimedJob {
if (in_array($errors, $this->connectionNotifications, true)) { if (in_array($errors, $this->connectionNotifications, true)) {
$this->sendErrorNotifications($errors); $this->sendErrorNotifications($errors);
} }
} else if (isset($status['version'])) { } else if (is_array($status)) {
$this->config->setAppValue('updatenotification', 'update_check_errors', 0); $this->config->setAppValue('updatenotification', 'update_check_errors', 0);
$this->clearErrorNotifications(); $this->clearErrorNotifications();
$this->createNotifications('core', $status['version'], $status['versionstring']); if (isset($status['version'])) {
$this->createNotifications('core', $status['version'], $status['versionstring']);
}
} }
} }