File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/fragments/detail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1115,11 +1115,12 @@ class VideoDetailFragment :
11151115 get() = PreferenceManager .getDefaultSharedPreferences(requireContext())
11161116 .getBoolean(getString(R .string.use_external_video_player_key), false )
11171117
1118+ @Suppress(" NullableBooleanElvis" ) // ?: true is clearer than != false
11181119 private val isAutoplayEnabled: Boolean
11191120 // This method overrides default behaviour when setAutoPlay() is called.
11201121 get() = autoPlayEnabled &&
11211122 ! this .isExternalPlayerEnabled &&
1122- (player?.videoPlayerSelected() != false ) &&
1123+ (player?.videoPlayerSelected() ? : true ) && // if no player present, consider it video
11231124 bottomSheetState != BottomSheetBehavior .STATE_HIDDEN &&
11241125 PlayerHelper .isAutoplayAllowedByUser(requireContext())
11251126
@@ -1607,7 +1608,7 @@ class VideoDetailFragment :
16071608 }
16081609
16091610 // Register broadcast receiver to listen to playQueue changes
1610- // and hide the overlayPlayQueueButton when the playQueue is empty / destroyed.7
1611+ // and hide the overlayPlayQueueButton when the playQueue is empty / destroyed.
16111612 playQueue?.broadcastReceiver?.subscribe { updateOverlayPlayQueueButtonVisibility() }
16121613 ?.let { disposables.add(it) }
16131614
You can’t perform that action at this time.
0 commit comments