-
Notifications
You must be signed in to change notification settings - Fork 23
Release 2.0.6 #162
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
Release 2.0.6 #162
Conversation
WalkthroughThis update migrates Android dependencies from the Changes
Sequence Diagram(s)sequenceDiagram
participant FlutterApp
participant KmMethodHandler
participant KommunicateSDK (io.kommunicate)
participant EventManager
FlutterApp->>KmMethodHandler: Invoke method (e.g., updateUserDetail)
KmMethodHandler->>KommunicateSDK (io.kommunicate): Call UserUpdateTask/SettingsSharedPreference
KommunicateSDK (io.kommunicate)-->>KmMethodHandler: ResultCallback (onSuccess/onError)
KmMethodHandler-->>FlutterApp: Return result
Note over KmEventListener, EventManager: Event registration/unregistration now uses EventManager from io.kommunicate
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
android/gradle/wrapper/gradle-wrapper.properties (1)
1-7
: Consider Adding a Distribution SHA-256 Checksum
For enhanced security and to verify the integrity of the downloaded Gradle distribution, you can add thedistributionSha256Sum
property.After generating the checksum, add for example:
distributionSha256Sum=<insert SHA-256 checksum here>
CHANGELOG.md (1)
1-3
: Typo in Changelog Entry
"mitration" should be "migration" and the entry could be clearer about the namespace switch.- ## 2.0.6 - ### Android - - Update android dependency with applozic mitration code. + ## 2.0.6 + ### Android + - Migrate Android dependencies from `com.applozic.*` to `io.kommunicate.*`.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
CHANGELOG.md
(1 hunks)android/build.gradle
(2 hunks)android/gradle/wrapper/gradle-wrapper.properties
(1 hunks)android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmEventListener.java
(1 hunks)android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmMethodHandler.java
(3 hunks)pubspec.yaml
(1 hunks)
🔇 Additional comments (7)
android/gradle/wrapper/gradle-wrapper.properties (1)
1-7
: Gradle Wrapper Configuration is Properly Added
The wrapper is pinned to Gradle 7.5.1, aligning with the updated Android Gradle plugin version.pubspec.yaml (1)
3-3
: Version Bump Looks Good
The package version is correctly incremented to2.0.6
to match the Android updates in this release.android/build.gradle (2)
11-11
: Updated Android Gradle Plugin Version
Upgrading to7.4.2
aligns with the new Gradle wrapper (7.5.1). Ensure the wrapper files are committed and CI uses the wrapper.
42-43
: Bump Kommunicate UI SDK Dependency
Thekommunicateui
SDK is updated to2.14.0
, matching the PR objectives. Verify that this version is available in the configured Maven repository.android/src/main/java/io/kommunicate/kommunicate_flutter_plugin/KmMethodHandler.java (3)
24-36
: Import paths successfully migrated from com.applozic to io.kommunicate.The import statements have been properly updated to use the new
io.kommunicate
namespace instead of the previouscom.applozic
namespace. This change is part of the Android dependency migration described in the PR.
392-402
: User update task and callback implementation successfully migrated.The user update task has been correctly migrated from the old
AlUserUpdateTask
to the newUserUpdateTask
class. The callback implementation has also been updated to useResultCallback
with the appropriate method name change fromonFailure
toonError
.
476-476
: Settings access method successfully migrated.The method to hide chat list on notification has been properly updated from
ApplozicClient
toSettingsSharedPreference
, maintaining the same functionality while using the new namespace.
public void unregister() { | ||
AlEventManager.getInstance().unregisterPluginEventListener(); | ||
EventManager.getInstance().unregisterPluginEventListener(); | ||
} |
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.
Incomplete Unregister Implementation
unregister()
only unregisters the plugin event listener. To avoid listener leaks:
- Pass
this
tounregisterPluginEventListener(this)
if required by the API. - Also call
unregisterConversationInfoListener(this)
.
public void unregister() {
- EventManager.getInstance().unregisterPluginEventListener();
+ EventManager.getInstance().unregisterPluginEventListener(this);
+ EventManager.getInstance().unregisterConversationInfoListener(this);
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
public void unregister() { | |
AlEventManager.getInstance().unregisterPluginEventListener(); | |
EventManager.getInstance().unregisterPluginEventListener(); | |
} | |
public void unregister() { | |
EventManager.getInstance().unregisterPluginEventListener(this); | |
EventManager.getInstance().unregisterConversationInfoListener(this); | |
} |
package io.kommunicate.kommunicate_flutter_plugin; | ||
|
||
import com.applozic.mobicomkit.broadcast.AlEventManager; | ||
import io.kommunicate.callbacks.KmPluginEventListener; | ||
import com.applozic.mobicomkit.api.conversation.Message; | ||
import io.flutter.plugin.common.MethodChannel; | ||
import com.applozic.mobicommons.json.GsonUtils; | ||
import io.kommunicate.commons.json.GsonUtils; | ||
import io.kommunicate.devkit.api.conversation.Message; | ||
import io.kommunicate.devkit.broadcast.EventManager; | ||
|
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.
Missing Import for KmConversationInfoListener
The class implements KmConversationInfoListener
but the import is absent, causing a compile error.
Add this line among the imports:
+ import io.kommunicate.callbacks.KmConversationInfoListener;
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
package io.kommunicate.kommunicate_flutter_plugin; | |
import com.applozic.mobicomkit.broadcast.AlEventManager; | |
import io.kommunicate.callbacks.KmPluginEventListener; | |
import com.applozic.mobicomkit.api.conversation.Message; | |
import io.flutter.plugin.common.MethodChannel; | |
import com.applozic.mobicommons.json.GsonUtils; | |
import io.kommunicate.commons.json.GsonUtils; | |
import io.kommunicate.devkit.api.conversation.Message; | |
import io.kommunicate.devkit.broadcast.EventManager; | |
package io.kommunicate.kommunicate_flutter_plugin; | |
import io.kommunicate.callbacks.KmPluginEventListener; | |
import io.kommunicate.callbacks.KmConversationInfoListener; | |
import io.flutter.plugin.common.MethodChannel; | |
import io.kommunicate.commons.json.GsonUtils; | |
import io.kommunicate.devkit.api.conversation.Message; | |
import io.kommunicate.devkit.broadcast.EventManager; |
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.
Fixed
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.
@AbhijeetRanjan308 Great! I can see that you've added the import for KmConversationInfoListener
from the io.kommunicate.devkit.listners
package, which aligns properly with the other devkit imports in this migration. The issue is resolved.
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
Summary by CodeRabbit
New Features
Chores