setMyCountPreference method

Future<void> setMyCountPreference(
  1. CountPreference countPreference
)

Sets my count preference for this channel.

Implementation

Future<void> setMyCountPreference(CountPreference countPreference) async {
  sbLog.i(StackTrace.current, 'countPreference: $countPreference');

  final result = await chat.apiClient.send<CountPreference>(
    GroupChannelCountReferenceRequest(
      chat,
      channelUrl: channelUrl,
      prefs: countPreference,
    ),
  );
  myCountPreference = result;
  if (canChangeUnreadMessageCount) unreadMessageCount = 0;
  if (canChangeUnreadMentionCount) unreadMentionCount = 0;
}