play the first recording at pressing Play at start

This commit is contained in:
tibbi 2020-04-01 22:25:11 +02:00
parent 8e573df210
commit 4a9186304b
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,9 @@ class PlayerFragment(context: Context, attributeSet: AttributeSet) : MyViewPager
initMediaPlayer()
play_pause_btn.setOnClickListener {
if (!playedRecordingIDs.empty() || player_progressbar.max > 0) {
if (playedRecordingIDs.empty() || player_progressbar.max == 0) {
next_btn.callOnClick()
} else {
togglePlayPause()
}
}