markAllRequestsAsRead method

void markAllRequestsAsRead()

Implementation

void markAllRequestsAsRead() {
  List requestList = cachedMap[requestsKey] ?? [];
  bool hasUnread = false;
  for (var element in requestList) {
    if (element['isRead'] == false) {
      hasUnread = true;
    }
    element['isRead'] = true;
  }
  cachedMap[requestsKey] = requestList;
  if (hasUnread) {
    ChatUIKit.instance.onFriendRequestCountChanged(newRequestCount());
  }

  _updateStore();
}