Commit d575ffb6 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update SidebarMainFragment.java

parent d03dedd6
......@@ -29,7 +29,6 @@ import chat.rocket.android.layouthelper.chatroom.roomlist.RoomListAdapter;
import chat.rocket.android.layouthelper.chatroom.roomlist.RoomListHeader;
import chat.rocket.android.layouthelper.chatroom.roomlist.UnreadRoomListHeader;
import chat.rocket.android.renderer.UserRenderer;
import chat.rocket.core.SortDirection;
import chat.rocket.core.interactors.RoomInteractor;
import chat.rocket.core.interactors.SessionInteractor;
import chat.rocket.core.models.Room;
......@@ -145,19 +144,15 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
if (spotlight.getType().equals("d")) {
String username = spotlight.getName();
methodCallHelper.createDirectMessage(username)
.onSuccessTask(task -> {
presenter.onSpotlightSelected(spotlight);
return null;
});
} else {
methodCallHelper.createDirectMessage(username);
}
methodCallHelper.joinRoom(spotlight.getId())
.onSuccessTask(task -> {
presenter.onSpotlightSelected(spotlight);
return null;
});
}
}
});
RecyclerView recyclerView = rootView.findViewById(R.id.room_list_container);
......
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