mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
TransportFragment's title now acts as a toggle.
This commit is contained in:
parent
a7f10dfb92
commit
9085ee3020
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user