package chat.rocket.android.layouthelper.chatroom.roomlist;

import android.support.annotation.NonNull;

import chat.rocket.core.models.RoomSidebar;
import java.util.List;

public class UnreadRoomListHeader implements RoomListHeader {

  private final String title;

  public UnreadRoomListHeader(String title) {
    this.title = title;
  }

  @Override
  public String getTitle() {
    return title;
  }

  @Override
  public boolean owns(RoomSidebar roomSidebar) {
    return roomSidebar.isAlert();
  }

  @Override
  public boolean shouldShow(@NonNull List<RoomSidebar> roomSidebarList) {
    for (int i = 0, size = roomSidebarList.size(); i < size; i++) {
      if (roomSidebarList.get(i).isAlert()) {
        return true;
      }
    }
    return false;
  }

  @Override
  public ClickListener getClickListener() {
    return null;
  }
}
@@ -598,63 +598,48 @@
 or (
-int i = 0, size = roomSidebarList.size(); i %3C size; i++
+RoomSidebar roomSidebar: roomSidebarList
 ) %7B%0A
@@ -663,19 +663,8 @@
 ebar
-List.get(i)
 .isA
@@ -704,24 +704,26 @@
     %7D%0A    %7D%0A
+  
     return f

Update UnreadRoomListHeader.java