Removes callbacks when player fragment is destroyed. (#3073)

* Made improvement to player double-tap further.

* Minor fixes.

* fix ktlint

* Filter out null comments returned from Piped API.

* Fixes: Labels under icons are not visible

* Minor player controls UI improvements

* Removes callbacks when player fragment is destroyed.

---------

Co-authored-by: Bnyro <bnyro@tutanota.com>
This commit is contained in:
Faisal Khan 2023-02-14 20:05:07 +05:30 committed by GitHub
parent decee78651
commit 5eddd63ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -577,6 +577,9 @@ class PlayerFragment : Fragment(R.layout.fragment_player), OnlinePlayerOptions {
override fun onDestroy() { override fun onDestroy() {
super.onDestroy() super.onDestroy()
handler.removeCallbacksAndMessages(null)
try { try {
// disable the auto PiP mode for SDK >= 32 // disable the auto PiP mode for SDK >= 32
disableAutoPiP() disableAutoPiP()

View File

@ -19,8 +19,8 @@ open class ExpandedBottomSheet : BottomSheetDialogFragment() {
dialog.setOnShowListener { dialog.setOnShowListener {
(it as BottomSheetDialog).let { d -> (it as BottomSheetDialog).let { d ->
(d.findViewById<View>(R.id.design_bottom_sheet) as FrameLayout?)?.let { (d.findViewById<View>(R.id.design_bottom_sheet) as FrameLayout?)?.let { fl ->
BottomSheetBehavior.from(it).state = BottomSheetBehavior.from(fl).state =
BottomSheetBehavior.STATE_EXPANDED BottomSheetBehavior.STATE_EXPANDED
} }
} }