Commit 5b5656e4 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Add ChatRoomsPresenter.kt

parent 0d404d45
package chat.rocket.android.chatrooms.presentation
import chat.rocket.android.core.lifecycle.CancelStrategy
import chat.rocket.android.util.launchUI
import chat.rocket.core.RocketChatClient
import chat.rocket.core.internal.rest.chatRooms
import javax.inject.Inject
class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView, private val strategy: CancelStrategy) {
@Inject lateinit var client: RocketChatClient
fun getChatRooms() {
launchUI(strategy) {
view.showLoading()
// TODO How to get the chat rooms?
//view.showChatRooms(client.chatRooms().update.toMutableList())
view.hideLoading()
}
}
}
\ 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