unReadMessageScrollPosition method

void unReadMessageScrollPosition(
  1. int position
)

Implementation

void unReadMessageScrollPosition(int position) {
  try {
    if (chatList.length > position) {
      var sublist = chatList.sublist(position, chatList.length);
      if (sublist.length > 3) {
        scrollToPosition(position + 3);
      } else {
        scrollToPosition(position + 1);
      }
    } else {
      scrollToPosition(position + 1);
    }
  } catch (e) {
    LogMessage.e("TAG", e.toString());
  }
}