Commit 296a06c0 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update FavoriteRoomListHeader.java

parent e12cd321
...@@ -2,8 +2,8 @@ package chat.rocket.android.layouthelper.chatroom.roomlist; ...@@ -2,8 +2,8 @@ package chat.rocket.android.layouthelper.chatroom.roomlist;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import chat.rocket.core.models.RoomSidebar;
import java.util.List; import java.util.List;
import chat.rocket.core.models.Room;
public class FavoriteRoomListHeader implements RoomListHeader { public class FavoriteRoomListHeader implements RoomListHeader {
...@@ -19,18 +19,17 @@ public class FavoriteRoomListHeader implements RoomListHeader { ...@@ -19,18 +19,17 @@ public class FavoriteRoomListHeader implements RoomListHeader {
} }
@Override @Override
public boolean owns(Room room) { public boolean owns(RoomSidebar roomSidebar) {
return room.isFavorite(); return roomSidebar.isFavorite();
} }
@Override @Override
public boolean shouldShow(@NonNull List<Room> roomList) { public boolean shouldShow(@NonNull List<RoomSidebar> roomSidebarList) {
for (int i = 0, size = roomList.size(); i < size; i++) { for (int i = 0, size = roomSidebarList.size(); i < size; i++) {
if (roomList.get(i).isFavorite()) { if (roomSidebarList.get(i).isFavorite()) {
return true; return true;
} }
} }
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment