mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-23 00:02:31 -04:00
remove dead code
This commit is contained in:
@@ -171,86 +171,3 @@ class ChannelFragment : ScreenFragment("Channel"), Logging {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Composable
|
||||
fun ChannelContent(channel: Channel?) {
|
||||
|
||||
val typography = MaterialTheme.typography
|
||||
val context = ContextAmbient.current
|
||||
|
||||
Column(modifier = LayoutSize.Fill + LayoutPadding(16.dp)) {
|
||||
if (channel != null) {
|
||||
Row(modifier = LayoutGravity.Center) {
|
||||
|
||||
Text(text = "Channel ", modifier = LayoutGravity.Center)
|
||||
|
||||
if (channel.editable) {
|
||||
// FIXME - limit to max length
|
||||
StyledTextField(
|
||||
value = channel.name,
|
||||
onValueChange = { channel.name = it },
|
||||
textStyle = typography.h4.copy(
|
||||
color = palette.onSecondary.copy(alpha = 0.8f)
|
||||
),
|
||||
imeAction = ImeAction.Done,
|
||||
onImeActionPerformed = {
|
||||
ChannelLog.errormsg("FIXME, implement channel edit button")
|
||||
}
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
text = channel.name,
|
||||
style = typography.h4
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// simulated qr code
|
||||
// val image = imageResource(id = R.drawable.qrcode)
|
||||
val image = AndroidImage(channel.getChannelQR())
|
||||
|
||||
ScaledImage(
|
||||
image = image,
|
||||
modifier = LayoutGravity.Center + LayoutSize.Min(200.dp, 200.dp)
|
||||
)
|
||||
|
||||
Text(
|
||||
text = "Mode: ${channel.modemConfig.toHumanString()}",
|
||||
modifier = LayoutGravity.Center + LayoutPadding(bottom = 16.dp)
|
||||
)
|
||||
|
||||
Row(modifier = LayoutGravity.Center) {
|
||||
|
||||
OutlinedButton(onClick = {
|
||||
channel.editable = !channel.editable
|
||||
}) {
|
||||
if (channel.editable)
|
||||
VectorImage(
|
||||
id = R.drawable.ic_twotone_lock_open_24,
|
||||
tint = palette.onBackground
|
||||
)
|
||||
else
|
||||
VectorImage(
|
||||
id = R.drawable.ic_twotone_lock_24,
|
||||
tint = palette.onBackground
|
||||
)
|
||||
}
|
||||
|
||||
// Only show the share buttone once we are locked
|
||||
if (!channel.editable)
|
||||
OutlinedButton(modifier = LayoutPadding(start = 24.dp),
|
||||
onClick = {
|
||||
|
||||
}) {
|
||||
VectorImage(
|
||||
id = R.drawable.ic_twotone_share_24,
|
||||
tint = palette.onBackground
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user