mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 20:45:20 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -9,6 +9,7 @@ import androidx.compose.foundation.shape.CircleShape
|
|||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Bluetooth
|
import androidx.compose.material.icons.filled.Bluetooth
|
||||||
|
import androidx.compose.material.icons.filled.Close
|
||||||
import androidx.compose.material.icons.filled.Lock
|
import androidx.compose.material.icons.filled.Lock
|
||||||
import androidx.compose.material.icons.filled.Public
|
import androidx.compose.material.icons.filled.Public
|
||||||
import androidx.compose.material.icons.filled.Security
|
import androidx.compose.material.icons.filled.Security
|
||||||
@@ -551,24 +552,39 @@ fun AboutSheet(
|
|||||||
.height(64.dp)
|
.height(64.dp)
|
||||||
.background(MaterialTheme.colorScheme.background.copy(alpha = topBarAlpha))
|
.background(MaterialTheme.colorScheme.background.copy(alpha = topBarAlpha))
|
||||||
) {
|
) {
|
||||||
TextButton(
|
CloseButton(
|
||||||
onClick = onDismiss,
|
onClick = onDismiss,
|
||||||
modifier = Modifier
|
modifier = modifier
|
||||||
.align(Alignment.CenterEnd)
|
.align(Alignment.CenterEnd)
|
||||||
.padding(horizontal = 16.dp)
|
.padding(horizontal = 16.dp),
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.close_plain),
|
|
||||||
style = MaterialTheme.typography.labelMedium.copy(fontWeight = FontWeight.Bold),
|
|
||||||
color = MaterialTheme.colorScheme.onBackground
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@Composable
|
||||||
|
fun CloseButton(
|
||||||
|
onClick: () -> Unit,
|
||||||
|
modifier: Modifier = Modifier
|
||||||
|
) {
|
||||||
|
IconButton(
|
||||||
|
onClick = onClick,
|
||||||
|
modifier = modifier
|
||||||
|
.size(32.dp),
|
||||||
|
colors = IconButtonDefaults.iconButtonColors(
|
||||||
|
contentColor = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.6f),
|
||||||
|
containerColor = MaterialTheme.colorScheme.onBackground.copy(alpha = 0.1f)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Default.Close,
|
||||||
|
contentDescription = "Close",
|
||||||
|
modifier = Modifier.size(18.dp)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Password prompt dialog for password-protected channels
|
* Password prompt dialog for password-protected channels
|
||||||
* Kept as dialog since it requires user input
|
* Kept as dialog since it requires user input
|
||||||
|
|||||||
@@ -551,22 +551,16 @@ fun LocationChannelsSheet(
|
|||||||
.height(56.dp)
|
.height(56.dp)
|
||||||
.background(MaterialTheme.colorScheme.background.copy(alpha = topBarAlpha))
|
.background(MaterialTheme.colorScheme.background.copy(alpha = topBarAlpha))
|
||||||
) {
|
) {
|
||||||
TextButton(
|
CloseButton(
|
||||||
onClick = onDismiss,
|
onClick = onDismiss,
|
||||||
modifier = Modifier
|
modifier = modifier
|
||||||
.align(Alignment.CenterEnd)
|
.align(Alignment.CenterEnd)
|
||||||
.padding(horizontal = 16.dp)
|
.padding(horizontal = 16.dp),
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = stringResource(R.string.close_plain),
|
|
||||||
style = MaterialTheme.typography.labelMedium.copy(fontWeight = FontWeight.Bold),
|
|
||||||
color = MaterialTheme.colorScheme.onBackground
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Lifecycle management: when presented, sample both nearby and bookmarked geohashes
|
// Lifecycle management: when presented, sample both nearby and bookmarked geohashes
|
||||||
LaunchedEffect(isPresented, availableChannels, bookmarks) {
|
LaunchedEffect(isPresented, availableChannels, bookmarks) {
|
||||||
|
|||||||
Reference in New Issue
Block a user