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; ...@@ -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.RoomListHeader;
import chat.rocket.android.layouthelper.chatroom.roomlist.UnreadRoomListHeader; import chat.rocket.android.layouthelper.chatroom.roomlist.UnreadRoomListHeader;
import chat.rocket.android.renderer.UserRenderer; import chat.rocket.android.renderer.UserRenderer;
import chat.rocket.core.SortDirection;
import chat.rocket.core.interactors.RoomInteractor; import chat.rocket.core.interactors.RoomInteractor;
import chat.rocket.core.interactors.SessionInteractor; import chat.rocket.core.interactors.SessionInteractor;
import chat.rocket.core.models.Room; import chat.rocket.core.models.Room;
...@@ -145,18 +144,14 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain ...@@ -145,18 +144,14 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
if (spotlight.getType().equals("d")) { if (spotlight.getType().equals("d")) {
String username = spotlight.getName(); String username = spotlight.getName();
methodCallHelper.createDirectMessage(username) methodCallHelper.createDirectMessage(username);
.onSuccessTask(task -> {
presenter.onSpotlightSelected(spotlight);
return null;
});
} else {
methodCallHelper.joinRoom(spotlight.getId())
.onSuccessTask(task -> {
presenter.onSpotlightSelected(spotlight);
return null;
});
} }
methodCallHelper.joinRoom(spotlight.getId())
.onSuccessTask(task -> {
presenter.onSpotlightSelected(spotlight);
return null;
});
} }
}); });
...@@ -304,4 +299,4 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain ...@@ -304,4 +299,4 @@ public class SidebarMainFragment extends AbstractFragment implements SidebarMain
updateRoomListMode(user); updateRoomListMode(user);
} }
} }
\ No newline at end of file
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