Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed May 22, 2024
1 parent 1f96e98 commit 75cc486
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ class SongAdapter(
return
}
if (currentMediaItem == null || list[position].mediaId != currentMediaItem) {
(holder.nowPlaying.drawable as NowPlayingDrawable).level2Done = Runnable {
(holder.nowPlaying.drawable as? NowPlayingDrawable?)?.level2Done = Runnable {
holder.nowPlaying.visibility = View.GONE
holder.nowPlaying.setImageDrawable(null)
}
holder.nowPlaying.drawable.level = 2
holder.nowPlaying.drawable?.level = 2
return
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ class PlayerBottomSheet private constructor(
lastDisposable?.dispose()
lastDisposable = null
}
var newState = 0
var newState = standardBottomSheetBehavior?.state
if ((instance?.mediaItemCount ?: 0) > 0 && visible) {
if (standardBottomSheetBehavior?.state != BottomSheetBehavior.STATE_EXPANDED) {
if (newState != BottomSheetBehavior.STATE_EXPANDED) {
newState = BottomSheetBehavior.STATE_COLLAPSED
}
} else {
Expand Down

0 comments on commit 75cc486

Please sign in to comment.