Added mute channel functionality (#209)

This commit is contained in:
Krasimir Kazakov
2026-02-22 09:51:48 +02:00
committed by GitHub
parent 7cb4c5a334
commit b3ad54f296
35 changed files with 185 additions and 1 deletions
+15
View File
@@ -155,4 +155,19 @@ class AppSettingsService extends ChangeNotifier {
Future<void> setUnitSystem(UnitSystem value) async {
await updateSettings(_settings.copyWith(unitSystem: value));
}
bool isChannelMuted(String channelName) {
return _settings.mutedChannels.contains(channelName);
}
Future<void> muteChannel(String channelName) async {
final updated = Set<String>.from(_settings.mutedChannels)..add(channelName);
await updateSettings(_settings.copyWith(mutedChannels: updated));
}
Future<void> unmuteChannel(String channelName) async {
final updated = Set<String>.from(_settings.mutedChannels)
..remove(channelName);
await updateSettings(_settings.copyWith(mutedChannels: updated));
}
}