-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from GetStream/stream-chat/6.1.1
Stream Chat SDK 6.1.1
- Loading branch information
Showing
28 changed files
with
407 additions
and
259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
[*] | ||
# Most of the standard properties are supported | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
max_line_length = 100 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,54 @@ | ||
plugins { | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
id 'com.android.application' | ||
id 'kotlin-android' | ||
} | ||
|
||
android { | ||
compileSdk 33 | ||
compileSdk 34 | ||
|
||
defaultConfig { | ||
applicationId "io.getstream.chat.android.compose.customattachments" | ||
minSdk 21 | ||
targetSdk 33 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
defaultConfig { | ||
applicationId "io.getstream.chat.android.compose.customattachments" | ||
namespace "io.getstream.chat.android.compose.customattachments" | ||
minSdk 21 | ||
targetSdk 34 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
buildFeatures { | ||
compose true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion libs.versions.composeCompiler.get() | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
buildFeatures { | ||
compose true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion libs.versions.composeCompiler.get() | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
} | ||
|
||
dependencies { | ||
// Stream SDK | ||
implementation "io.getstream:stream-chat-android-compose:6.0.0-beta2" | ||
implementation "io.getstream:stream-chat-android-state:6.0.0-beta2" | ||
implementation "io.getstream:stream-chat-android-offline:6.0.0-beta2" | ||
// Stream SDK | ||
implementation "io.getstream:stream-chat-android-compose:6.1.1" | ||
implementation "io.getstream:stream-chat-android-state:6.1.1" | ||
implementation "io.getstream:stream-chat-android-offline:6.1.1" | ||
|
||
implementation libs.androidxCoreKtx | ||
implementation libs.androidxAppCompat | ||
implementation libs.materialComponents | ||
implementation libs.androidxCoreKtx | ||
implementation libs.androidxAppCompat | ||
implementation libs.materialComponents | ||
|
||
// Compose | ||
implementation libs.composeCompiler | ||
implementation libs.composeUi | ||
implementation libs.composeUiTooling | ||
implementation libs.composeFoundation | ||
implementation libs.composeMaterial | ||
implementation libs.composeActivity | ||
implementation libs.composeViewModel | ||
// Compose | ||
implementation libs.composeCompiler | ||
implementation libs.composeUi | ||
implementation libs.composeUiTooling | ||
implementation libs.composeFoundation | ||
implementation libs.composeMaterial | ||
implementation libs.composeActivity | ||
implementation libs.composeViewModel | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...mposer/src/main/java/io/getstream/chat/android/customattachments/activity/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright 2022 Stream.IO, Inc. All Rights Reserved. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
package io.getstream.chat.android.customattachments.activity | ||
|
||
import android.content.Intent | ||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.lifecycle.lifecycleScope | ||
import io.getstream.chat.android.client.ChatClient | ||
import io.getstream.chat.android.models.InitializationState | ||
import kotlinx.coroutines.flow.collectLatest | ||
import kotlinx.coroutines.launch | ||
|
||
class MainActivity : ComponentActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
|
||
lifecycleScope.launch { | ||
ChatClient.instance().clientState.initializationState.collectLatest { | ||
if (it == InitializationState.COMPLETE) { | ||
startActivity(Intent(this@MainActivity, ChannelsActivity::class.java)) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.