File tree Expand file tree Collapse file tree 4 files changed +14
-16
lines changed
src/main/java/com/example/chattutorial
src/main/java/com/example/chattutorial Expand file tree Collapse file tree 4 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,13 @@ android {
3030
3131dependencies {
3232 // Add new dependencies
33- implementation " io.getstream:stream-chat-android-ui-components:4.18 .0"
34- implementation ' io.coil-kt:coil:1.3.2 '
33+ implementation " io.getstream:stream-chat-android-ui-components:4.22 .0"
34+ implementation ' io.coil-kt:coil:1.4.0 '
3535
36+ implementation ' androidx.core:core-ktx:1.7.0'
3637 implementation ' androidx.appcompat:appcompat:1.3.1'
3738 implementation ' com.google.android.material:material:1.4.0'
38- implementation ' androidx.constraintlayout:constraintlayout:2.1.0 '
39+ implementation ' androidx.constraintlayout:constraintlayout:2.1.1 '
3940 testImplementation ' junit:junit:4.+'
4041 androidTestImplementation ' androidx.test.ext:junit:1.1.3'
4142 androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
3939 // Step 2 - Authenticate and connect the user
4040 User user = new User ();
4141 user .setId ("tutorial-droid" );
42- user .getExtraData (). put ( "name" , "Tutorial Droid" );
43- user .getExtraData (). put ( "image" , "https://bit.ly/2TIt8NR" );
42+ user .setName ( "Tutorial Droid" );
43+ user .setImage ( "https://bit.ly/2TIt8NR" );
4444
4545 client .connectUser (
4646 user ,
Original file line number Diff line number Diff line change @@ -31,14 +31,14 @@ android {
3131
3232dependencies {
3333 // Add new dependencies
34- implementation " io.getstream:stream-chat-android-ui-components:4.18 .0"
35- implementation ' io.coil-kt:coil:1.3.2 '
34+ implementation " io.getstream:stream-chat-android-ui-components:4.22 .0"
35+ implementation ' io.coil-kt:coil:1.4.0 '
3636 implementation " androidx.activity:activity-ktx:1.3.1"
3737
38- implementation ' androidx.core:core-ktx:1.6 .0'
38+ implementation ' androidx.core:core-ktx:1.7 .0'
3939 implementation ' androidx.appcompat:appcompat:1.3.1'
4040 implementation ' com.google.android.material:material:1.4.0'
41- implementation ' androidx.constraintlayout:constraintlayout:2.1.0 '
41+ implementation ' androidx.constraintlayout:constraintlayout:2.1.1 '
4242 testImplementation ' junit:junit:4.+'
4343 androidTestImplementation ' androidx.test.ext:junit:1.1.3'
4444 androidTestImplementation ' androidx.test.espresso:espresso-core:3.4.0'
Original file line number Diff line number Diff line change @@ -31,13 +31,10 @@ class MainActivity : AppCompatActivity() {
3131 ChatDomain .Builder (client, applicationContext).build()
3232
3333 // Step 2 - Authenticate and connect the user
34- val user = User (
35- id = " tutorial-droid" ,
36- extraData = mutableMapOf (
37- " name" to " Tutorial Droid" ,
38- " image" to " https://bit.ly/2TIt8NR" ,
39- ),
40- )
34+ val user = User (id = " tutorial-droid" ).apply {
35+ name = " Tutorial Droid"
36+ image = " https://bit.ly/2TIt8NR"
37+ }
4138 client.connectUser(
4239 user = user,
4340 token = " eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoidHV0b3JpYWwtZHJvaWQifQ.NhEr0hP9W9nwqV7ZkdShxvi02C5PR7SJE7Cs4y7kyqg"
You can’t perform that action at this time.
0 commit comments