Browse Source

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

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
6dcd9afc31
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 8
      app/src/main/java/com/github/apognu/otter/fragments/RadiosFragment.kt

8
app/src/main/java/com/github/apognu/otter/fragments/RadiosFragment.kt

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

Loading…
Cancel
Save