Skip to content
Snippets Groups Projects
Commit 242f2f5c authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Fix audio player menu visibility

parent 0221a055
No related branches found
No related tags found
1 merge request!79Fix audio player menu visibility
Pipeline #6574 passed with stage
in 4 minutes and 11 seconds
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment