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

import android.support.annotation.NonNull;

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

public class ChannelRoomListHeader implements RoomListHeader {

  private final String title;
  private final ClickListener clickListener;

  public ChannelRoomListHeader(String title, ClickListener clickListener) {
    this.title = title;
    this.clickListener = clickListener;
  }

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

  @Override
  public boolean owns(RoomSidebar roomSidebar) {
    return roomSidebar.getType().equals(Room.TYPE_CHANNEL) || roomSidebar.getType().equals(Room.TYPE_PRIVATE);
  }

  @Override
  public boolean shouldShow(@NonNull List<RoomSidebar> roomSidebarList) {
    return true;
  }

  @Override
  public ClickListener getClickListener() {
    return clickListener;
  }
}

@@ -823,18 +823,318 @@
     
-return tru
+for (RoomSidebar roomSidebar: roomSidebarList) %7B%0A      if ((roomSidebar.getType().equals(Room.TYPE_CHANNEL)%0A              %7C%7C roomSidebar.getType().equals(Room.TYPE_PRIVATE))%0A              && !roomSidebar.isAlert()%0A              && !roomSidebar.isFavorite()) %7B%0A        return true;%0A      %7D%0A    %7D%0A    return fals
 e;%0A 
@@ -1223,10 +1223,9 @@
 er;%0A  %7D%0A
+
 %7D
-%0A

Update ChannelRoomListHeader.java