toggleMute method
- MuteDuration? mute
override
Implementation
@override
Future<void> toggleMute(MuteDuration? mute) async {
Log.debug('toggleMute($mute)', '$runtimeType');
await _debounce(
field: MyUserField.muted,
current: () => myUser.value?.muted,
saved: () async => (await _active)?.value.muted,
value: mute,
mutation: (duration, _) async {
return await _graphQlProvider.toggleMyUserMute(
duration == null
? null
: Muting(
duration: duration.forever == true ? null : duration.until,
),
);
},
update: (v, _) => myUser.update((u) => u?.muted = v),
);
}