TransportFragment's title now acts as a toggle.

This commit is contained in:
casey langen 2019-02-17 02:08:13 -08:00
parent a7f10dfb92
commit 9085ee3020

View File

@ -56,8 +56,15 @@ class TransportFragment: BaseFragment() {
titleBar?.setOnClickListener {
if (playback.service.state != PlaybackState.Stopped) {
if (appCompatActivity.supportFragmentManager.topOfStack != PlayQueueFragment.TAG) {
Navigate.toPlayQueue(playback.service.queuePosition, appCompatActivity, this)
appCompatActivity.supportFragmentManager.run {
when (topOfStack != PlayQueueFragment.TAG) {
true -> Navigate.toPlayQueue(
playback.service.queuePosition,
appCompatActivity,
this@TransportFragment)
false ->
this.popBackStack()
}
}
}
}