Skip to content

Commit

Permalink
Merge pull request #4 from GetStream/upgrade-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
skydoves authored Mar 8, 2024
2 parents 0f745fb + 6c209da commit cd8cfc0
Show file tree
Hide file tree
Showing 8 changed files with 266 additions and 207 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
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ buildscript {
}
}
plugins {
id 'com.android.application' version '7.1.1' apply false
id 'com.android.library' version '7.1.1' apply false
id 'com.android.application' version "7.4.2" apply false
id 'com.android.library' version "7.4.2" apply false
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
}

Expand Down
5 changes: 2 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
ext.versions = [
minSdk : 21,
compileSdk : 32,
compileSdk : 33,
versionCode : 1,
versionName : '1.0.0',

// gradle plugins
gradleBuildTool : '7.2.0',
spotlessGradle : '6.3.0',
googleService : '4.3.10',
ktlint : '0.40.0',
Expand All @@ -26,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
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Feb 18 09:13:33 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit cd8cfc0

Please sign in to comment.