Commit fa0ce13b authored by Lucio Maciel's avatar Lucio Maciel

Fix compilation with the SDK

parent 8bab94e9
......@@ -148,11 +148,11 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
for (status in stateChannel) {
Timber.d("Changing status to: $status")
when (status) {
State.Authenticating -> Timber.d("Authenticating")
State.Connected -> {
is State.Authenticating -> Timber.d("Authenticating")
is State.Connected -> {
Timber.d("Connected")
subId = client.subscribeRoomMessages(roomId) {
Timber.d("subscribe messages for $roomId: $it")
subId = client.subscribeRoomMessages(roomId) { success, _ ->
Timber.d("subscribe messages for $roomId: $success")
}
}
}
......@@ -161,10 +161,10 @@ class ChatRoomPresenter @Inject constructor(private val view: ChatRoomView,
}
when (client.state) {
State.Connected -> {
is State.Connected -> {
Timber.d("Already connected")
subId = client.subscribeRoomMessages(roomId) {
Timber.d("subscribe messages for $roomId: $it")
subId = client.subscribeRoomMessages(roomId) { success, _ ->
Timber.d("subscribe messages for $roomId: $success")
}
}
else -> client.connect()
......
......@@ -99,14 +99,14 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
for (status in stateChannel) {
Timber.d("Changing status to: $status")
when (status) {
State.Authenticating -> Timber.d("Authenticating")
State.Connected -> {
is State.Authenticating -> Timber.d("Authenticating")
is State.Connected -> {
Timber.d("Connected")
client.subscribeSubscriptions {
Timber.d("subscriptions: $it")
client.subscribeSubscriptions { success, _ ->
Timber.d("subscriptions: $success")
}
client.subscribeRooms {
Timber.d("rooms: $it")
client.subscribeRooms { success, _ ->
Timber.d("rooms: $success")
}
}
}
......@@ -115,7 +115,7 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
}
when (client.state) {
State.Connected -> {
is State.Connected -> {
Timber.d("Already connected")
}
else -> client.connect()
......
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