mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-21 20:27:06 +03:00
fix(player): Make chapters sheet scrollable + adjust stream sheet scrolling (#1212)
This commit is contained in:
parent
00fb0a740b
commit
adb571fcbd
2 changed files with 33 additions and 21 deletions
|
@ -68,24 +68,26 @@ fun StreamsCatalogSheet(
|
|||
Column(
|
||||
modifier = Modifier
|
||||
.padding(contentPadding)
|
||||
.padding(vertical = TabbedDialogPaddings.Vertical)
|
||||
.verticalScroll(rememberScrollState()),
|
||||
.padding(vertical = TabbedDialogPaddings.Vertical),
|
||||
) {
|
||||
@Composable fun QualityTracksPage() = StreamsPageBuilder(
|
||||
@Composable
|
||||
fun QualityTracksPage() = StreamsPageBuilder(
|
||||
externalTrackCode = null,
|
||||
stream = videoStreams.quality,
|
||||
openContentFd = openContentFd,
|
||||
onTrackSelected = onQualitySelected,
|
||||
)
|
||||
|
||||
@Composable fun SubtitleTracksPage() = StreamsPageBuilder(
|
||||
@Composable
|
||||
fun SubtitleTracksPage() = StreamsPageBuilder(
|
||||
externalTrackCode = "sub",
|
||||
stream = videoStreams.subtitle,
|
||||
openContentFd = openContentFd,
|
||||
onTrackSelected = onSubtitleSelected,
|
||||
)
|
||||
|
||||
@Composable fun AudioTracksPage() = StreamsPageBuilder(
|
||||
@Composable
|
||||
fun AudioTracksPage() = StreamsPageBuilder(
|
||||
externalTrackCode = "audio",
|
||||
stream = videoStreams.audio,
|
||||
openContentFd = openContentFd,
|
||||
|
@ -167,6 +169,11 @@ private fun StreamsPageBuilder(
|
|||
}
|
||||
}
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.verticalScroll(rememberScrollState()),
|
||||
) {
|
||||
tracks.forEachIndexed { i, track ->
|
||||
val selected = index == i
|
||||
|
||||
|
@ -186,3 +193,4 @@ private fun StreamsPageBuilder(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import androidx.compose.foundation.layout.Column
|
|||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
@ -40,7 +42,9 @@ fun VideoChaptersSheet(
|
|||
onDismissRequest = onDismissRequest,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.padding(MaterialTheme.padding.medium),
|
||||
modifier = Modifier
|
||||
.padding(MaterialTheme.padding.medium)
|
||||
.verticalScroll(rememberScrollState()),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.chapter_dialog_header),
|
||||
|
|
Loading…
Reference in a new issue