Fixed blocking issue when leaving MainActivity where playback state would no longer be reflected in Now Playing.
This commit is contained in:
parent
671940ed7a
commit
874b79d0d5
|
@ -73,16 +73,16 @@ class MainActivity : AppCompatActivity() {
|
||||||
.replace(R.id.container, BrowseFragment())
|
.replace(R.id.container, BrowseFragment())
|
||||||
.commit()
|
.commit()
|
||||||
|
|
||||||
if (bus == null) {
|
|
||||||
watchEventBus()
|
|
||||||
}
|
|
||||||
|
|
||||||
CommandBus.send(Command.RefreshService)
|
CommandBus.send(Command.RefreshService)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
|
if (bus == null) {
|
||||||
|
watchEventBus()
|
||||||
|
}
|
||||||
|
|
||||||
CommandBus.send(Command.RefreshService)
|
CommandBus.send(Command.RefreshService)
|
||||||
|
|
||||||
startService(Intent(this, PlayerService::class.java))
|
startService(Intent(this, PlayerService::class.java))
|
||||||
|
@ -150,9 +150,7 @@ class MainActivity : AppCompatActivity() {
|
||||||
|
|
||||||
// CastButtonFactory.setUpMediaRouteButton(this, menu, R.id.cast)
|
// 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
|
return true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue