Commit 242f2f5c authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Fix audio player menu visibility

parent 0221a055
......@@ -24,6 +24,7 @@ import android.Manifest
import android.annotation.TargetApi
import android.content.Context
import android.content.SharedPreferences
import android.content.res.Configuration
import android.net.Uri
import android.os.Build
import android.os.Bundle
......@@ -151,6 +152,11 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher {
binding.timeline.setOnSeekBarChangeListener(timelineListener)
}
override fun onResume() {
onStateChanged(playerState)
super.onResume()
}
override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putInt("player_state", playerState)
......@@ -366,7 +372,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher {
headerTimeVisible: Boolean, searchVisible: Boolean,
filter: Boolean = false) {
this.advFuncVisible = !filter && advFuncVisible
this.playlistSwitchVisible = !filter && playlistSwitchVisible
this.playlistSwitchVisible = !filter && playlistSwitchVisible && resources.configuration.orientation != Configuration.ORIENTATION_LANDSCAPE
this.headerPlayPauseVisible = !filter && headerPlayPauseVisible
this.progressBarVisible = !filter && progressBarVisible
this.headerTimeVisible = !filter && headerTimeVisible
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment