Reset widget on manual exit as well.

This commit is contained in:
tzugen 2022-06-08 10:02:04 +02:00
parent 87c160610f
commit b6730f5a93
No known key found for this signature in database
GPG Key ID: 61E9C34BC10EC930
2 changed files with 4 additions and 1 deletions

View File

@ -380,6 +380,10 @@ class NavigationActivity : AppCompatActivity() {
private fun exit() { private fun exit() {
Timber.d("User choose to exit the app") Timber.d("User choose to exit the app")
// Broadcast that the service is being shutdown
RxBus.stopCommandPublisher.onNext(Unit)
lifecycleSupport.onDestroy() lifecycleSupport.onDestroy()
finishAndRemoveTask() finishAndRemoveTask()
} }

View File

@ -68,7 +68,6 @@ class RxBus {
PublishSubject.create() PublishSubject.create()
val stopCommandObservable: Observable<Unit> = val stopCommandObservable: Observable<Unit> =
stopCommandPublisher.observeOn(mainThread()) stopCommandPublisher.observeOn(mainThread())
} }
data class StateWithTrack( data class StateWithTrack(