feat: Improve live traffic packet help #0

This commit is contained in:
Janez T
2026-04-01 20:58:13 +02:00
parent 5ee03d4b2f
commit 3a28acac2d
7 changed files with 404 additions and 79 deletions

View File

@@ -29,6 +29,16 @@ class ChannelsProvider with ChangeNotifier {
return index == 0 ? 'Public' : 'Channel $index';
}
List<Channel> getChannelsByHashByte(int hashByte) {
return _channels.values.where((channel) => channel.hashByte == hashByte).toList()
..sort((a, b) => a.index.compareTo(b.index));
}
String? getUniqueChannelDisplayNameByHashByte(int hashByte) {
final matches = getChannelsByHashByte(hashByte);
return matches.length == 1 ? matches.single.displayName : null;
}
/// Add or update a channel
void addOrUpdateChannel({
required int index,