Browse Source

Fixed blocking issue when leaving MainActivity where playback state would no longer be reflected in Now Playing.

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
874b79d0d5
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 12
      app/src/main/java/com/github/apognu/otter/activities/MainActivity.kt

12
app/src/main/java/com/github/apognu/otter/activities/MainActivity.kt

@ -73,16 +73,16 @@ class MainActivity : AppCompatActivity() { @@ -73,16 +73,16 @@ class MainActivity : AppCompatActivity() {
.replace(R.id.container, BrowseFragment())
.commit()
if (bus == null) {
watchEventBus()
}
CommandBus.send(Command.RefreshService)
}
override fun onResume() {
super.onResume()
if (bus == null) {
watchEventBus()
}
CommandBus.send(Command.RefreshService)
startService(Intent(this, PlayerService::class.java))
@ -150,9 +150,7 @@ class MainActivity : AppCompatActivity() { @@ -150,9 +150,7 @@ class MainActivity : AppCompatActivity() {
// CastButtonFactory.setUpMediaRouteButton(this, menu, R.id.cast)
menu?.let {
menu.findItem(R.id.nav_only_my_music).isChecked = Settings.getScope() == "me"
}
menu?.findItem(R.id.nav_only_my_music)?.isChecked = Settings.getScope() == "me"
return true
}

Loading…
Cancel
Save