Better design for audiences
This commit is contained in:
+1
-7
@@ -29,14 +29,11 @@ import androidx.compose.foundation.layout.Box
|
|||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
|
||||||
import androidx.compose.material3.AssistChip
|
import androidx.compose.material3.AssistChip
|
||||||
import androidx.compose.material3.AssistChipDefaults
|
import androidx.compose.material3.AssistChipDefaults
|
||||||
import androidx.compose.material3.BottomAppBarDefaults
|
|
||||||
import androidx.compose.material3.Button
|
import androidx.compose.material3.Button
|
||||||
import androidx.compose.material3.ButtonDefaults
|
import androidx.compose.material3.ButtonDefaults
|
||||||
import androidx.compose.material3.FilledTonalIconButton
|
import androidx.compose.material3.FilledTonalIconButton
|
||||||
@@ -94,7 +91,6 @@ internal fun NestActionBar(
|
|||||||
onShowReactionPicker: () -> Unit,
|
onShowReactionPicker: () -> Unit,
|
||||||
onLeave: () -> Unit,
|
onLeave: () -> Unit,
|
||||||
) {
|
) {
|
||||||
val insets = BottomAppBarDefaults.windowInsets
|
|
||||||
Surface(
|
Surface(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.96f),
|
color = MaterialTheme.colorScheme.surface.copy(alpha = 0.96f),
|
||||||
@@ -104,9 +100,7 @@ internal fun NestActionBar(
|
|||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth(),
|
||||||
.windowInsetsPadding(insets)
|
|
||||||
.consumeWindowInsets(insets),
|
|
||||||
) {
|
) {
|
||||||
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.4f))
|
HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.4f))
|
||||||
ActionBarStatusStrip(ui = ui)
|
ActionBarStatusStrip(ui = ui)
|
||||||
|
|||||||
+17
-19
@@ -200,25 +200,6 @@ internal fun NestFullScreen(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
bottomBar = {
|
|
||||||
NestActionBar(
|
|
||||||
viewModel = viewModel,
|
|
||||||
ui = ui,
|
|
||||||
isOnStage = isOnStageMe,
|
|
||||||
canBroadcast = viewModel.canBroadcast,
|
|
||||||
speakerPubkeyHex = myPubkey,
|
|
||||||
handRaised = handRaised,
|
|
||||||
onHandRaisedChange = onHandRaisedChange,
|
|
||||||
onShowReactionPicker = { showReactionPicker = true },
|
|
||||||
onLeave = {
|
|
||||||
if (isHost) {
|
|
||||||
showHostLeaveConfirm = true
|
|
||||||
} else {
|
|
||||||
onLeave()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
},
|
|
||||||
) { padding ->
|
) { padding ->
|
||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
@@ -250,6 +231,23 @@ internal fun NestFullScreen(
|
|||||||
listenerCount = presences.size,
|
listenerCount = presences.size,
|
||||||
modifier = Modifier.padding(horizontal = 16.dp),
|
modifier = Modifier.padding(horizontal = 16.dp),
|
||||||
)
|
)
|
||||||
|
NestActionBar(
|
||||||
|
viewModel = viewModel,
|
||||||
|
ui = ui,
|
||||||
|
isOnStage = isOnStageMe,
|
||||||
|
canBroadcast = viewModel.canBroadcast,
|
||||||
|
speakerPubkeyHex = myPubkey,
|
||||||
|
handRaised = handRaised,
|
||||||
|
onHandRaisedChange = onHandRaisedChange,
|
||||||
|
onShowReactionPicker = { showReactionPicker = true },
|
||||||
|
onLeave = {
|
||||||
|
if (isHost) {
|
||||||
|
showHostLeaveConfirm = true
|
||||||
|
} else {
|
||||||
|
onLeave()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
NestTabRow(
|
NestTabRow(
|
||||||
tabs = tabs,
|
tabs = tabs,
|
||||||
selectedTab = effectiveTab,
|
selectedTab = effectiveTab,
|
||||||
|
|||||||
Reference in New Issue
Block a user