# markAsRead 가 제대로 갱신되지 않는것 같습니다

**URL:** <https://community.sendbird.com/t/markasread/9784>\
**Category:** Flutter\
**Tags:** group-channel, chatsdk\
**Created:** [July 18, 2024, 1:51am UTC](https://community.sendbird.com/t/markasread/9784 "2024-07-18T01:51:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zvgandam](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/zvgandam/32/4590_2.png) [@zvgandam](https://community.sendbird.com/u/zvgandam)\
**Post date:** [July 18, 2024, 1:51am UTC](https://community.sendbird.com/t/markasread/9784/1 "2024-07-18T01:51:43Z")

</div>

샘플 앱의 예제대로 아래 처럼 구성해 놓았으나  
unreadMembers 가 값이 계속 들어있습니다. 무엇이 문제일까요?

```auto
 @override
  Future<void> onMessagesAdded(
    MessageContext context,
    GroupChannel channel,
    List<BaseMessage> messages,
  ) async {
    _state._refresh();
    _state._collection?.markAsRead(context);
  }

```

```auto
 Future<void> _refresh() async {
    if (mounted) {
      setState(() {
        if (_collection != null) {
          messageList = _collection!.messageList;
          hasPrevious = _collection!.params.reverse
              ? _collection!.hasNext
              : _collection!.hasPrevious;
          hasNext = _collection!.params.reverse
              ? _collection!.hasPrevious
              : _collection!.hasNext;
        }
      });
    }
  }

```

```auto
final unreadMembers = (collection != null)
            ? collection!.channel.getUnreadMembers(message)
            : [];

```
