Skip to content

Commit

Permalink
Upgrade Stream Chat SDK to v5.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JcMinarro committed Apr 19, 2023
1 parent 4f5ce8a commit 6c209da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import io.getstream.chat.android.client.ChatClient
import io.getstream.chat.android.client.call.await
import io.getstream.chat.android.client.channel.subscribeFor
import io.getstream.chat.android.client.events.ChannelDeletedEvent
import io.getstream.chat.android.client.events.ChannelUpdatedByUserEvent
Expand Down Expand Up @@ -338,7 +337,7 @@ class GameViewModel @AssistedInject constructor(
}

// disconnect user.
chatClient.disconnect()
chatClient.disconnect(true)

// dispose all subscribers.
disposables.forEach { it.dispose() }
Expand All @@ -360,7 +359,7 @@ class GameViewModel @AssistedInject constructor(
cid: String
): ViewModelProvider.Factory = object : ViewModelProvider.Factory {
@Suppress("UNCHECKED_CAST")
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
override fun <T : ViewModel> create(modelClass: Class<T>): T {
return assistedFactory.create(cid) as T
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import dagger.hilt.android.lifecycle.HiltViewModel
import io.getstream.chat.android.client.ChatClient
import io.getstream.chat.android.client.call.await
import io.getstream.chat.android.client.models.Channel
import io.getstream.chat.android.client.models.ConnectionData
import io.getstream.chat.android.client.models.User
Expand Down Expand Up @@ -66,7 +65,7 @@ class MainViewModel @Inject constructor(
private suspend fun connectUser(displayName: String): Result<ConnectionData> {
val currentUser = chatClient.getCurrentUser()
if (currentUser != null) {
chatClient.disconnect()
chatClient.disconnect(true)
}
val user = User(
id = userId,
Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ext.versions = [
hiltComposeNavigation: '1.0.0',

// stream chat SDK
streamChatSDK : '5.4.0',
streamChatSDK : '5.17.0',

// sketchbook
sketchbook : '1.0.4',
Expand Down

0 comments on commit 6c209da

Please sign in to comment.