fix typo error s/vissibible/visible

This commit is contained in:
Christian Schabesberger 2024-08-19 11:37:35 +02:00
parent 2ca274423e
commit 151ab85ea8
7 changed files with 12 additions and 15 deletions

View File

@ -28,8 +28,7 @@ import net.newpipe.newplayer.ui.ContentScale
data class VideoPlayerUIState(
val playing: Boolean,
var fullscreen: Boolean,
val uiVissible: Boolean,
var uiVisible: Boolean,
val uiVisible: Boolean,
val contentRatio: Float,
val embeddedUiRatio: Float,
val contentFitMode: ContentScale,
@ -48,7 +47,6 @@ data class VideoPlayerUIState(
val DEFAULT = VideoPlayerUIState(
playing = false,
fullscreen = false,
uiVissible = false,
uiVisible = false,
contentRatio = 16 / 9f,
embeddedUiRatio = 16f / 9f,

View File

@ -210,7 +210,7 @@ class VideoPlayerViewModelImpl @Inject constructor(
override fun showUi() {
mutableUiState.update {
it.copy(uiVissible = true)
it.copy(uiVisible = true)
}
resetHideUiDelayedJob()
resetProgressUpdatePeriodicallyJob()
@ -255,7 +255,7 @@ class VideoPlayerViewModelImpl @Inject constructor(
progressUpdaterJob?.cancel()
uiVisibilityJob?.cancel()
mutableUiState.update {
it.copy(uiVissible = false)
it.copy(uiVisible = false)
}
}
@ -336,7 +336,7 @@ class VideoPlayerViewModelImpl @Inject constructor(
uiVisibilityJob?.cancel()
finishFastSeek()
mutableUiState.update {
it.copy(fullscreen = false, uiVissible = false)
it.copy(fullscreen = false, uiVisible = false)
}
}
@ -345,7 +345,7 @@ class VideoPlayerViewModelImpl @Inject constructor(
uiVisibilityJob?.cancel()
finishFastSeek()
mutableUiState.update {
it.copy(fullscreen = true, uiVissible = false)
it.copy(fullscreen = true, uiVisible = false)
}
}

View File

@ -33,7 +33,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.systemGestures
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.waterfall
import androidx.compose.foundation.layout.width
@ -51,7 +50,6 @@ import androidx.compose.ui.unit.dp
import net.newpipe.newplayer.model.VideoPlayerUIState
import net.newpipe.newplayer.model.VideoPlayerViewModel
import net.newpipe.newplayer.model.VideoPlayerViewModelDummy
import net.newpipe.newplayer.model.VideoPlayerViewModelImpl
import net.newpipe.newplayer.ui.theme.VideoPlayerTheme
import net.newpipe.newplayer.ui.videoplayer.BottomUI
import net.newpipe.newplayer.ui.videoplayer.CenterUI
@ -83,7 +81,7 @@ fun VideoPlayerControllerUI(
.union(WindowInsets.displayCutout)
.union(WindowInsets.waterfall)
AnimatedVisibility(uiState.uiVissible) {
AnimatedVisibility(uiState.uiVisible) {
Surface(
modifier = Modifier.fillMaxSize(), color = Color(0x75000000)
) {}
@ -108,7 +106,8 @@ fun VideoPlayerControllerUI(
}
}
AnimatedVisibility(uiState.uiVissible) {
AnimatedVisibility(uiState.uiVisible) {
Box(modifier = Modifier.fillMaxSize()) {
CenterUI(
modifier = Modifier.align(Alignment.Center),

View File

@ -94,7 +94,7 @@ fun VideoPlayerUI(
}
// Setup immersive mode
if (uiState.fullscreen && !uiState.uiVissible) {
if (uiState.fullscreen && !uiState.uiVisible) {
LaunchedEffect(key1 = true) {
windowInsetsController.hide(WindowInsetsCompat.Type.systemBars())
}

View File

@ -79,7 +79,7 @@ fun VideoPlayerControllerUIPreviewEmbeddedColorPreview() {
uiState = VideoPlayerUIState.DEFAULT.copy(
playing = true,
fullscreen = false,
uiVissible = true,
uiVisible = true,
seekerPosition = 0.3f,
isLoading = false,
durationInMs = 9 * 60 * 1000,

View File

@ -54,7 +54,7 @@ fun EmbeddedGestureUI(
}
val defaultOnRegularTap = {
if (uiState.uiVissible) {
if (uiState.uiVisible) {
viewModel.hideUi()
} else {
viewModel.showUi()

View File

@ -290,7 +290,7 @@ fun FullscreenGestureUIPreviewInteractive() {
}
},
uiState = VideoPlayerUIState.DEFAULT.copy(
uiVissible = uiVisible,
uiVisible = uiVisible,
fastSeekSeconds = seekSeconds,
soundVolume = soundVolume,
brightness = brightnessValue