Skip to content

Commit 3fe324a

Browse files
committed
Update sample to 4.18.0 SDK version
1 parent 9777b21 commit 3fe324a

File tree

5 files changed

+42
-34
lines changed

5 files changed

+42
-34
lines changed

app/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ android {
4848
}
4949

5050
dependencies {
51-
def stream_version = "4.16.0"
51+
def stream_version = "4.18.0"
5252
implementation "io.getstream:stream-chat-android-compose:$stream_version-beta"
5353

5454
implementation "androidx.compose.material:material-icons-extended:$compose_version"
5555

56-
implementation 'androidx.core:core-ktx:1.3.2'
57-
implementation 'androidx.appcompat:appcompat:1.2.0'
58-
implementation 'com.google.android.material:material:1.3.0'
56+
implementation 'androidx.core:core-ktx:1.6.0'
57+
implementation 'androidx.appcompat:appcompat:1.3.1'
58+
implementation 'com.google.android.material:material:1.4.0'
5959
implementation "androidx.compose.ui:ui:$compose_version"
6060
implementation "androidx.compose.material:material:$compose_version"
6161
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
6262
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
63-
implementation 'androidx.activity:activity-compose:1.3.0-alpha06'
64-
testImplementation 'junit:junit:4.+'
65-
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
66-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
63+
implementation 'androidx.activity:activity-compose:1.3.1'
64+
testImplementation 'junit:junit:4.13.2'
65+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
66+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6767
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
6868
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
6969
}

app/src/main/java/com/example/chattutorial/MessagesActivity2.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ class MessagesActivity2 : AppCompatActivity() {
2727
// 2 - Add the MessagesScreen to your UI
2828
setContent {
2929
ChatTheme(
30-
shapes = StreamShapes( // Customizing the shapes
31-
avatar = RoundedCornerShape(8.dp),
32-
attachment = RoundedCornerShape(16.dp),
33-
myMessageBubble = RoundedCornerShape(16.dp),
34-
otherMessageBubble = RoundedCornerShape(16.dp),
35-
inputField = RectangleShape
36-
)
30+
shapes = StreamShapes
31+
.defaultShapes()
32+
.copy(
33+
avatar = RoundedCornerShape(8.dp),
34+
attachment = RoundedCornerShape(16.dp),
35+
myMessageBubble = RoundedCornerShape(16.dp),
36+
otherMessageBubble = RoundedCornerShape(16.dp),
37+
inputField = RectangleShape
38+
)
3739
) {
3840
MessagesScreen(
3941
channelId = channelId,

app/src/main/java/com/example/chattutorial/MessagesActivity3.kt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ class MessagesActivity3 : AppCompatActivity() {
4545
ChatClient.instance(),
4646
ChatDomain.instance(),
4747
intent.getStringExtra(MessagesActivity3.KEY_CHANNEL_ID) ?: "",
48-
30
48+
enforceUniqueReactions = true,
49+
messageLimit = 30
4950
)
5051
}
5152

@@ -67,13 +68,15 @@ class MessagesActivity3 : AppCompatActivity() {
6768
// 2 - Add the MessagesScreen to your UI
6869
setContent {
6970
ChatTheme(
70-
shapes = StreamShapes(
71-
avatar = RoundedCornerShape(8.dp),
72-
attachment = RoundedCornerShape(16.dp),
73-
myMessageBubble = RoundedCornerShape(16.dp),
74-
otherMessageBubble = RoundedCornerShape(16.dp),
75-
inputField = RectangleShape
76-
)
71+
shapes = StreamShapes
72+
.defaultShapes()
73+
.copy(
74+
avatar = RoundedCornerShape(8.dp),
75+
attachment = RoundedCornerShape(16.dp),
76+
myMessageBubble = RoundedCornerShape(16.dp),
77+
otherMessageBubble = RoundedCornerShape(16.dp),
78+
inputField = RectangleShape
79+
)
7780
) {
7881
MyCustomUi()
7982
}

app/src/main/java/com/example/chattutorial/MessagesActivity4.kt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class MessagesActivity4 : AppCompatActivity() {
4747
ChatClient.instance(),
4848
ChatDomain.instance(),
4949
intent.getStringExtra(MessagesActivity4.KEY_CHANNEL_ID) ?: "",
50-
30
50+
enforceUniqueReactions = true,
51+
messageLimit = 30
5152
)
5253
}
5354

@@ -69,13 +70,15 @@ class MessagesActivity4 : AppCompatActivity() {
6970
// 2 - Add the MessagesScreen to your UI
7071
setContent {
7172
ChatTheme(
72-
shapes = StreamShapes(
73-
avatar = RoundedCornerShape(8.dp),
74-
attachment = RoundedCornerShape(16.dp),
75-
myMessageBubble = RoundedCornerShape(16.dp),
76-
otherMessageBubble = RoundedCornerShape(16.dp),
77-
inputField = RectangleShape
78-
)
73+
shapes = StreamShapes
74+
.defaultShapes()
75+
.copy(
76+
avatar = RoundedCornerShape(8.dp),
77+
attachment = RoundedCornerShape(16.dp),
78+
myMessageBubble = RoundedCornerShape(16.dp),
79+
otherMessageBubble = RoundedCornerShape(16.dp),
80+
inputField = RectangleShape
81+
)
7982
) {
8083
MyCustomUi()
8184
}

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
ext {
4-
compose_version = '1.0.0'
4+
compose_version = '1.0.1'
55
}
66
repositories {
77
google()
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath "com.android.tools.build:gradle:7.0.0"
12-
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10'
11+
classpath "com.android.tools.build:gradle:7.0.2"
12+
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21'
1313

1414
// NOTE: Do not place your application dependencies here; they belong
1515
// in the individual module build.gradle files

0 commit comments

Comments
 (0)