Commit 7f86898d authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix broken sdk api calls

parent be865436
...@@ -26,11 +26,11 @@ class ChatRoomsAdapter(private var dataSet: MutableList<ChatRoom>, private val c ...@@ -26,11 +26,11 @@ class ChatRoomsAdapter(private var dataSet: MutableList<ChatRoom>, private val c
val chatRoom = dataSet[position] val chatRoom = dataSet[position]
val chatRoomName = chatRoom.name val chatRoomName = chatRoom.name
holder.chatName.textContent = chatRoomName!! holder.chatName.textContent = chatRoomName
if (chatRoom.type == RoomType.ONE_TO_ONE) { if (chatRoom.type == RoomType.ONE_TO_ONE) {
// TODO Check the best way to get the current server url. // TODO Check the best way to get the current server url.
val canonicalUrl = chatRoom.client.restUrl.toString() val canonicalUrl = chatRoom.client.url
holder.userAvatar.setImageURI(UrlHelper.getAvatarUrl(canonicalUrl, chatRoomName)) holder.userAvatar.setImageURI(UrlHelper.getAvatarUrl(canonicalUrl, chatRoomName))
holder.userAvatar.setVisibility(true) holder.userAvatar.setVisibility(true)
} else { } else {
......
...@@ -29,8 +29,8 @@ class AppModule { ...@@ -29,8 +29,8 @@ class AppModule {
platformLogger = logger platformLogger = logger
// TODO remove // TODO remove
restUrl = HttpUrl.parse("https://open.rocket.chat")!! // TODO: From where should we get the url here?
websocketUrl = "https://open.rocket.chat" restUrl = "https://unstable.rocket.chat"
} }
} }
......
...@@ -11,7 +11,6 @@ import chat.rocket.core.RocketChatClient ...@@ -11,7 +11,6 @@ import chat.rocket.core.RocketChatClient
import chat.rocket.core.TokenRepository import chat.rocket.core.TokenRepository
import dagger.Module import dagger.Module
import dagger.Provides import dagger.Provides
import okhttp3.HttpUrl
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor import okhttp3.logging.HttpLoggingInterceptor
import javax.inject.Singleton import javax.inject.Singleton
...@@ -57,8 +56,7 @@ class PushModule(val context: FirebaseTokenService) { ...@@ -57,8 +56,7 @@ class PushModule(val context: FirebaseTokenService) {
fun provideRocketChatClient(okHttpClient: OkHttpClient, repository: TokenRepository, logger: PlatformLogger): RocketChatClient { fun provideRocketChatClient(okHttpClient: OkHttpClient, repository: TokenRepository, logger: PlatformLogger): RocketChatClient {
return RocketChatClient.create { return RocketChatClient.create {
httpClient = okHttpClient httpClient = okHttpClient
restUrl = HttpUrl.parse("https://unstable.rocket.chat")!! restUrl = "https://unstable.rocket.chat"
websocketUrl = "https://unstable.rocket.chat"
tokenRepository = repository tokenRepository = repository
platformLogger = logger platformLogger = logger
} }
......
...@@ -9,7 +9,7 @@ ext { ...@@ -9,7 +9,7 @@ ext {
kotlin : '1.2.10', kotlin : '1.2.10',
coroutine : '0.21', coroutine : '0.21',
dokka : '0.9.15', dokka : '0.9.15',
kotshi : '0.3.0-beta2', kotshi : '0.3.0',
// Main dependencies // Main dependencies
support : '27.0.2', support : '27.0.2',
......
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