mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-08-31 06:35:19 +00:00
Smaller style fixes
This commit is contained in:
@@ -1115,11 +1115,12 @@ class VideoDetailFragment :
|
|||||||
get() = PreferenceManager.getDefaultSharedPreferences(requireContext())
|
get() = PreferenceManager.getDefaultSharedPreferences(requireContext())
|
||||||
.getBoolean(getString(R.string.use_external_video_player_key), false)
|
.getBoolean(getString(R.string.use_external_video_player_key), false)
|
||||||
|
|
||||||
|
@Suppress("NullableBooleanElvis") // ?: true is clearer than != false
|
||||||
private val isAutoplayEnabled: Boolean
|
private val isAutoplayEnabled: Boolean
|
||||||
// This method overrides default behaviour when setAutoPlay() is called.
|
// This method overrides default behaviour when setAutoPlay() is called.
|
||||||
get() = autoPlayEnabled &&
|
get() = autoPlayEnabled &&
|
||||||
!this.isExternalPlayerEnabled &&
|
!this.isExternalPlayerEnabled &&
|
||||||
(player?.videoPlayerSelected() != false) &&
|
(player?.videoPlayerSelected() ?: true) && // if no player present, consider it video
|
||||||
bottomSheetState != BottomSheetBehavior.STATE_HIDDEN &&
|
bottomSheetState != BottomSheetBehavior.STATE_HIDDEN &&
|
||||||
PlayerHelper.isAutoplayAllowedByUser(requireContext())
|
PlayerHelper.isAutoplayAllowedByUser(requireContext())
|
||||||
|
|
||||||
@@ -1607,7 +1608,7 @@ class VideoDetailFragment :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Register broadcast receiver to listen to playQueue changes
|
// 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() }
|
playQueue?.broadcastReceiver?.subscribe { updateOverlayPlayQueueButtonVisibility() }
|
||||||
?.let { disposables.add(it) }
|
?.let { disposables.add(it) }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user