mirror of
https://codeberg.org/NextPush/nextpush-android.git
synced 2025-01-06 23:41:34 +01:00
Fix startService after logout/login
This commit is contained in:
parent
df3bb9a3c6
commit
f66320b882
@ -14,6 +14,7 @@ import org.unifiedpush.distributor.nextpush.account.AccountUtils.nextcloudAppNot
|
||||
import org.unifiedpush.distributor.nextpush.account.AccountUtils.ssoAccount
|
||||
import org.unifiedpush.distributor.nextpush.api.Api.apiDestroy
|
||||
import org.unifiedpush.distributor.nextpush.api.Api.apiSync
|
||||
import org.unifiedpush.distributor.nextpush.api.SSEListener.Companion.lastEventDate
|
||||
import org.unifiedpush.distributor.nextpush.utils.NOTIFICATION_ID_FOREGROUND
|
||||
import org.unifiedpush.distributor.nextpush.utils.NotificationUtils.createForegroundNotification
|
||||
import org.unifiedpush.distributor.nextpush.utils.TAG
|
||||
@ -105,6 +106,7 @@ class StartService : Service() {
|
||||
fun stopService(block: () -> Unit = {}) {
|
||||
Log.d(TAG, "Stopping Service")
|
||||
isServiceStarted = false
|
||||
lastEventDate = null
|
||||
service?.stopSelf()
|
||||
block()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user