Commit 0c1b5e76 authored by Christophe Henry's avatar Christophe Henry

Fix refresh notification not going away when failing to resfresh

parent 353f37d1
......@@ -11,8 +11,7 @@ import fr.chenry.android.freshrss.utils.NotificationHelper
import nl.komponents.kovenant.Promise
import nl.komponents.kovenant.all
import nl.komponents.kovenant.functional.bind
import nl.komponents.kovenant.ui.failUi
import nl.komponents.kovenant.ui.successUi
import nl.komponents.kovenant.ui.*
class RefresherService: Service() {
private val refreshNotification =
......@@ -47,12 +46,12 @@ class RefresherService: Service() {
Store.refreshingPromise.postValue(promise)
promise.always {Store.refreshingPromise.postValue(null)}
.successUi {stopForeground(true)}
.failUi {
FreshRSSApplication
.notificationManager
.notify(NotificationHelper.FAIL_REFRESH_NOTIFICATION, failNotification)
}
.alwaysUi {stopForeground(true)}
return promise
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment