mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-07-14 04:42:03 +10:00
Remove channel subtitles from UI
Per issue #418, this commmit removes channel subtitles from the channel list and from the map screen (deep in the marker sharing). This reduces visual clutter and allows for more compact lists, and the type of channel is already indicated by the leading icon. The subtitles simply said "Public channel", "Hashtag channel", or "Private channel". We also remove the relevant localization strings.
This commit is contained in:
@@ -384,7 +384,6 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
IconData icon;
|
||||
Color iconColor;
|
||||
Color bgColor;
|
||||
String subtitle;
|
||||
|
||||
if (isCommunityChannel) {
|
||||
// Community channel styling
|
||||
@@ -392,28 +391,21 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
bgColor = Colors.purple.withValues(alpha: 0.2);
|
||||
if (isCommunityPublic) {
|
||||
icon = Icons.groups;
|
||||
subtitle =
|
||||
'${context.l10n.community_publicChannel} • ${community.name}';
|
||||
} else {
|
||||
icon = Icons.tag;
|
||||
subtitle =
|
||||
'${context.l10n.community_hashtagChannel} • ${community.name}';
|
||||
}
|
||||
} else if (channel.isPublicChannel) {
|
||||
icon = Icons.public;
|
||||
iconColor = Colors.green;
|
||||
bgColor = Colors.green.withValues(alpha: 0.2);
|
||||
subtitle = context.l10n.channels_publicChannel;
|
||||
} else if (channel.name.startsWith('#')) {
|
||||
icon = Icons.tag;
|
||||
iconColor = Colors.blue;
|
||||
bgColor = Colors.blue.withValues(alpha: 0.2);
|
||||
subtitle = context.l10n.channels_hashtagChannel;
|
||||
} else {
|
||||
icon = Icons.lock;
|
||||
iconColor = Colors.blue;
|
||||
bgColor = Colors.blue.withValues(alpha: 0.2);
|
||||
subtitle = context.l10n.channels_privateChannel;
|
||||
}
|
||||
|
||||
return Card(
|
||||
@@ -430,14 +422,17 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
: null,
|
||||
child: ListTile(
|
||||
dense: true,
|
||||
minVerticalPadding: 0,
|
||||
minVerticalPadding: 14,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
visualDensity: const VisualDensity(vertical: -2),
|
||||
leading: Stack(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundColor: bgColor,
|
||||
child: Icon(icon, color: iconColor),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: bgColor,
|
||||
child: Icon(icon, color: iconColor),
|
||||
),
|
||||
),
|
||||
if (isCommunityChannel)
|
||||
Positioned(
|
||||
@@ -469,11 +464,6 @@ class _ChannelsScreenState extends State<ChannelsScreen>
|
||||
: channel.name,
|
||||
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
trailing: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
|
||||
@@ -2011,9 +2011,6 @@ class _MapScreenState extends State<MapScreen> {
|
||||
color: isPublic ? Colors.orange : Colors.blue,
|
||||
),
|
||||
title: Text(label),
|
||||
subtitle: isPublic
|
||||
? Text(context.l10n.channels_publicChannel)
|
||||
: null,
|
||||
onTap: () async {
|
||||
Navigator.pop(sheetContext);
|
||||
final canSend = isPublic
|
||||
|
||||
Reference in New Issue
Block a user