Fixed an issue where RadiosFragment would wake up on track change even when the app is killed, causing a crash.

This commit is contained in:
Antoine POPINEAU 2020-06-11 08:08:20 +02:00
parent d76f820f9d
commit 6dcd9afc31
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
1 changed files with 5 additions and 3 deletions

View File

@ -37,7 +37,8 @@ class RadiosFragment : FunkwhaleFragment<Radio, RadiosAdapter>() {
GlobalScope.launch(Main) {
EventBus.get().collect { message ->
when (message) {
is Event.RadioStarted -> recycler.forEach {
is Event.RadioStarted ->
if (radios != null) { recycler.forEach {
it.isEnabled = true
it.isClickable = true
}
@ -47,3 +48,4 @@ class RadiosFragment : FunkwhaleFragment<Radio, RadiosAdapter>() {
}
}
}
}