Skip to content

MOBILE-175: Fix ReactContext listener cleanup on Android#173

Merged
sergeysozinov merged 1 commit into
new-archfrom
feature/MOBILE-175
May 13, 2026
Merged

MOBILE-175: Fix ReactContext listener cleanup on Android#173
sergeysozinov merged 1 commit into
new-archfrom
feature/MOBILE-175

Conversation

@sergeysozinov
Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR (MOBILE-175) adjusts the Android React Native lifecycle integration to improve cleanup of ReactInstanceEventListener tied to ReactContext initialization, aiming to prevent lingering listeners and repeated callbacks.

Changes:

  • Remove the ReactInstanceEventListener from ReactHost immediately after onReactContextInitialized fires, and clear the stored reference.
  • Remove listener cleanup logic from onActivityDestroyed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread android/src/main/java/com/mindboxsdk/MindboxSdkLifecycleListener.kt
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread android/src/main/java/com/mindboxsdk/MindboxSdkLifecycleListener.kt
@sergeysozinov sergeysozinov requested a review from enotniy May 13, 2026 10:31
Comment thread android/src/main/java/com/mindboxsdk/MindboxSdkLifecycleListener.kt
Comment thread android/src/main/java/com/mindboxsdk/MindboxSdkLifecycleListener.kt
@sergeysozinov sergeysozinov merged commit 9dffea3 into new-arch May 13, 2026
8 checks passed
@sergeysozinov sergeysozinov deleted the feature/MOBILE-175 branch May 13, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants