Skip to content

Commit f8d0986

Browse files
committed
updated init
1 parent 5b37b4f commit f8d0986

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip

samplekotlin/src/main/java/com/example/chattutorial/MainActivity.kt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import android.os.Bundle
44
import androidx.appcompat.app.AppCompatActivity
55
import androidx.lifecycle.ViewModelProvider
66
import com.getstream.sdk.chat.Chat
7-
import com.getstream.sdk.chat.ChatUX
7+
import com.getstream.sdk.chat.ChatUI
88
import com.getstream.sdk.chat.viewmodel.channels.ChannelsViewModel
9-
import com.getstream.sdk.chat.viewmodel.channels.ChannelsViewModelImpl
109
import com.getstream.sdk.chat.viewmodel.channels.bindView
1110
import com.getstream.sdk.chat.viewmodel.factory.ChannelsViewModelFactory
1211
import io.getstream.chat.android.client.ChatClient
@@ -21,11 +20,11 @@ class MainActivity : AppCompatActivity(R.layout.activity_main) {
2120
super.onCreate(savedInstanceState)
2221

2322
// step 1 - setup the client for API calls, the chatDomain for offline storage and the UX components
24-
// val client = ChatClient.Builder("b67pax5b2wdq", applicationContext).logLevel(ChatLogLevel.ALL).build()
25-
// val domain = ChatDomain.Builder(client).build()
26-
// val ux = ChatUX.Builder(client, domain).build()
23+
val client = ChatClient.Builder("b67pax5b2wdq", applicationContext).logLevel(ChatLogLevel.ALL).build()
24+
val domain = ChatDomain.Builder(client, applicationContext).build()
25+
val ux = ChatUI.Builder(client, domain, applicationContext).build()
2726

28-
Chat.Builder("b67pax5b2wdq", applicationContext).apply { offlineEnabled=true }.build()
27+
//Chat.Builder("b67pax5b2wdq", applicationContext).apply { offlineEnabled=true }.build()
2928

3029
val user = User("summer-brook-2").apply {
3130
extraData["name"] = "Paranoid Android"
@@ -44,7 +43,7 @@ class MainActivity : AppCompatActivity(R.layout.activity_main) {
4443
)
4544
val viewModelFactory = ChannelsViewModelFactory(filter, ChannelsViewModel.DEFAULT_SORT)
4645
val viewModel =
47-
ViewModelProvider(this, viewModelFactory).get(ChannelsViewModelImpl::class.java)
46+
ViewModelProvider(this, viewModelFactory).get(ChannelsViewModel::class.java)
4847

4948
// step 4 - connect the ChannelsViewModel to the channelsView, loose coupling make it easy to customize
5049
viewModel.bindView(channelsView, this)

0 commit comments

Comments
 (0)