Added mute channel functionality (#209)

This commit is contained in:
Krasimir Kazakov authored and GitHub committed 2026-02-21 23:51:48 -08:00
1 parent 7cb4c5a334
commit b3ad54f296
35 files changed
+185 -1

No files matched your search

+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));
}
}