Commit a3accc60 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix again mistaken refactoring.

parent 78a6dc4e
...@@ -432,24 +432,11 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView, ...@@ -432,24 +432,11 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
} }
} }
<<<<<<< 61f4135f2fbe9097b2d53bf96aa9e55d47ec62d8
fun toMembersList(chatRoomId: String, chatRoomType: String) = navigator.toMembersList(chatRoomId, chatRoomType) fun toMembersList(chatRoomId: String, chatRoomType: String) = navigator.toMembersList(chatRoomId, chatRoomType)
=======
fun loadChatRooms() { fun loadChatRooms() {
launchUI(strategy) { launchUI(strategy) {
try { try {
<<<<<<< 436e7d600706834b3573b0043507343d77f39652
val chatRooms = getChatRoomsInteractor.get(currentServer).map { chatRoom ->
val name = chatRoom.name
val fullName = chatRoom.fullName ?: ""
ChatRoomViewModel(
text = name,
name = name,
fullName = fullName,
searchList = listOf(name, fullName)
)
}
=======
val chatRooms = getChatRoomsInteractor.get(currentServer) val chatRooms = getChatRoomsInteractor.get(currentServer)
.filterNot { .filterNot {
it.type is RoomType.DirectMessage || it.type is RoomType.Livechat it.type is RoomType.DirectMessage || it.type is RoomType.Livechat
...@@ -464,14 +451,12 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView, ...@@ -464,14 +451,12 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
searchList = listOf(name, fullName) searchList = listOf(name, fullName)
) )
} }
>>>>>>> Revert erroneous refactoring
view.populateRooms(chatRooms) view.populateRooms(chatRooms)
} catch (e: RocketChatException) { } catch (e: RocketChatException) {
Timber.e(e) Timber.e(e)
} }
} }
} }
>>>>>>> Load rooms from subscriptions
private fun updateMessage(streamedMessage: Message) { private fun updateMessage(streamedMessage: Message) {
launchUI(strategy) { launchUI(strategy) {
......
...@@ -30,8 +30,8 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView, ...@@ -30,8 +30,8 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
val avatarUrl = UrlHelper.getAvatarUrl(serverUrl, myself.username!!) val avatarUrl = UrlHelper.getAvatarUrl(serverUrl, myself.username!!)
view.showProfile( view.showProfile(
avatarUrl, avatarUrl,
myself.name!!, myself.name ?: "",
myself.username!!, myself.username ?: "",
myself.emails?.get(0)?.address!! myself.emails?.get(0)?.address!!
) )
} catch (exception: RocketChatException) { } catch (exception: RocketChatException) {
......
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