2
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-08-22 01:58:16 +00:00

Smaller style fixes

This commit is contained in:
Stypox 2025-06-10 18:58:09 +02:00
parent a4182b474b
commit 3998982002
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -1115,11 +1115,12 @@ class VideoDetailFragment :
get() = PreferenceManager.getDefaultSharedPreferences(requireContext())
.getBoolean(getString(R.string.use_external_video_player_key), false)
@Suppress("NullableBooleanElvis") // ?: true is clearer than != false
private val isAutoplayEnabled: Boolean
// This method overrides default behaviour when setAutoPlay() is called.
get() = autoPlayEnabled &&
!this.isExternalPlayerEnabled &&
(player?.videoPlayerSelected() != false) &&
(player?.videoPlayerSelected() ?: true) && // if no player present, consider it video
bottomSheetState != BottomSheetBehavior.STATE_HIDDEN &&
PlayerHelper.isAutoplayAllowedByUser(requireContext())
@ -1607,7 +1608,7 @@ class VideoDetailFragment :
}
// Register broadcast receiver to listen to playQueue changes
// and hide the overlayPlayQueueButton when the playQueue is empty / destroyed.7
// and hide the overlayPlayQueueButton when the playQueue is empty / destroyed.
playQueue?.broadcastReceiver?.subscribe { updateOverlayPlayQueueButtonVisibility() }
?.let { disposables.add(it) }