setMyCountPreference method

Future<void> setMyCountPreference(
  1. CountPreference countPreference
)

Sets current user's count preference with countPreference.

Implementation

Future<void> setMyCountPreference(CountPreference countPreference) async {
  final result = await _sdk.api.send<CountPreference>(
    GroupChannelCountReferenceRequest(
      channelUrl: channelUrl,
      prefs: countPreference,
    ),
  );
  myCountPreference = result;
  if (canChangeUnreadMessageCount) unreadMessageCount = 0;
  if (canChangeUnreadMentionCount) unreadMentionCount = 0;
}