BugFix for opening the video chat with video in full screen until it loads.

This commit is contained in:
Vitor Pamplona
2023-06-20 18:59:21 -04:00
parent 80a9a2a712
commit e28f26d471
@@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
@@ -534,7 +535,7 @@ fun ChannelHeader(
} }
if (streamingUrl != null && showVideo) { if (streamingUrl != null && showVideo) {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically, modifier = Modifier.heightIn(max = 300.dp)) {
VideoView( VideoView(
videoUri = streamingUrl!!, videoUri = streamingUrl!!,
description = null description = null
@@ -558,7 +559,8 @@ fun ChannelHeader(
Column( Column(
modifier = Modifier modifier = Modifier
.padding(start = 10.dp) .padding(start = 10.dp)
.weight(1f) .weight(1f),
verticalArrangement = Arrangement.Center
) { ) {
Row(verticalAlignment = Alignment.CenterVertically) { Row(verticalAlignment = Alignment.CenterVertically) {
Text( Text(
@@ -569,21 +571,28 @@ fun ChannelHeader(
) )
} }
Row(verticalAlignment = Alignment.CenterVertically) { val summary = remember(channelState) {
Text( channel.summary()?.ifBlank { null }
"${channel.summary()}", }
color = MaterialTheme.colors.placeholderText,
maxLines = 2, if (summary != null) {
overflow = TextOverflow.Ellipsis, Row(verticalAlignment = Alignment.CenterVertically) {
fontSize = 12.sp Text(
) text = summary,
color = MaterialTheme.colors.placeholderText,
maxLines = 2,
overflow = TextOverflow.Ellipsis,
fontSize = 12.sp
)
}
} }
} }
Row( Row(
modifier = Modifier modifier = Modifier
.height(Size35dp) .height(Size35dp)
.padding(bottom = 3.dp) .padding(bottom = 3.dp),
verticalAlignment = Alignment.CenterVertically
) { ) {
if (channel is PublicChatChannel) { if (channel is PublicChatChannel) {
ChannelActionOptions(channel, accountViewModel, nav) ChannelActionOptions(channel, accountViewModel, nav)