Commit 78a6dc4e authored by Leonardo Aramaki's avatar Leonardo Aramaki

Revert erroneous refactoring

parent 436e7d60
......@@ -438,6 +438,7 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
fun loadChatRooms() {
launchUI(strategy) {
try {
<<<<<<< 436e7d600706834b3573b0043507343d77f39652
val chatRooms = getChatRoomsInteractor.get(currentServer).map { chatRoom ->
val name = chatRoom.name
val fullName = chatRoom.fullName ?: ""
......@@ -448,6 +449,22 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
searchList = listOf(name, fullName)
)
}
=======
val chatRooms = getChatRoomsInteractor.get(currentServer)
.filterNot {
it.type is RoomType.DirectMessage || it.type is RoomType.Livechat
}
.map { chatRoom ->
val name = chatRoom.name
val fullName = chatRoom.fullName ?: ""
ChatRoomViewModel(
text = name,
name = name,
fullName = fullName,
searchList = listOf(name, fullName)
)
}
>>>>>>> Revert erroneous refactoring
view.populateRooms(chatRooms)
} catch (e: RocketChatException) {
Timber.e(e)
......
......@@ -16,7 +16,7 @@
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/text_username"
android:id="@+id/text_name"
style="@style/Authentication.EditText"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_person_black_24dp"
......@@ -37,7 +37,7 @@
android:inputType="text"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_username" />
app:layout_constraintTop_toBottomOf="@+id/text_name" />
<EditText
android:id="@+id/text_password"
......
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