-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade Stream Chat Depencency to v6 #34
base: main
Are you sure you want to change the base?
Conversation
stream-state = { module = "io.getstream:stream-chat-android-state", version.ref = "stream" } | ||
stream-offline = { module = "io.getstream:stream-chat-android-offline", version.ref = "stream" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Offline artifact has been split into:
stream-chat-android-offline
-> Responsible for data persistence on the device
stream-chat-android-state
-> Responsible to provide reactive data
stream-offline = { module = "io.getstream:stream-chat-android-offline", version.ref = "stream" } | ||
stream-ui-components = { module = "io.getstream:stream-chat-android-ui-components", version.ref = "stream" } | ||
stream-firebase = { module = "io.getstream:stream-chat-android-pushprovider-firebase", version.ref = "stream" } | ||
stream-firebase = { module = "io.getstream:stream-android-push-firebase", version.ref = "streamPush" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push artifact has been extracted from the principal repository, but the implementation is the same
@@ -19,6 +19,7 @@ package io.getstream.avengerschat.initializer | |||
import android.content.Context | |||
import android.content.Intent | |||
import androidx.startup.Initializer | |||
import io.getstream.android.push.firebase.FirebasePushDeviceGenerator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Push Classes" are into a new artifact with different package name
backgroundSyncEnabled = true, | ||
userPresence = true, | ||
persistenceEnabled = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever the Offline Plugin is used, the persistence is enabled. This flag is not needed anymore
backgroundSyncEnabled = true, | ||
userPresence = true, | ||
persistenceEnabled = true, | ||
uploadAttachmentsNetworkType = UploadAttachmentsNetworkType.NOT_ROAMING |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration is added to the ChatClient
, it is not a configuration of the offline plugin anymore.
@@ -60,7 +60,8 @@ class StreamChatInitializer : Initializer<Unit> { | |||
*/ | |||
ChatClient.Builder(context.getString(R.string.stream_api_key), context) | |||
.notifications(createNotificationConfig(), createNotificationHandler(context)) | |||
.withPlugin(offlinePluginFactory) | |||
.withPlugins(offlinePluginFactory, statePluginFactory) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both plugins are included
@@ -17,7 +17,7 @@ | |||
package io.getstream.avengerschat.core.data.repository.dm | |||
|
|||
import androidx.annotation.WorkerThread | |||
import io.getstream.chat.android.client.models.User | |||
import io.getstream.chat.android.models.User |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Models has been moved to a different package
result.onSuccessSuspend { | ||
emit(result.data()) | ||
emit(it) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result
class has been improved and extracted to a different artifact.
It improves how it is used taking advantage of Kotlin language.
@@ -29,7 +29,7 @@ | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
|
|||
<io.getstream.chat.android.ui.channel.list.header.ChannelListHeaderView | |||
<io.getstream.chat.android.ui.feature.channels.header.ChannelListHeaderView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some Views have been moved to other package names to keep the parity with the compose
artifact
|
||
<io.getstream.chat.android.ui.message.input.MessageInputView | ||
<io.getstream.chat.android.ui.feature.messages.composer.MessageComposerView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class has been renamed to keep the parity with the compose
artifact
d9cd625
to
be6416b
Compare
be6416b
to
ed3f183
Compare
Do not merge this PR yet. |
Upgrade App to the new Stream Chat V6