Skip to content

Conversation

@grablack
Copy link
Contributor

@grablack grablack commented Nov 5, 2025

Description

  • Replaced direct constructor calls to ModalFragment with newInstance method across tests and implementation files.
  • Added tests to ensure proper state restoration and argument handling for ModalFragment.
  • Updated ModalFragment class to include a companion object for argument management, ensuring compatibility with Android's fragment lifecycle.

Screenshots

Testing instructions

Go to the developer options on the device. Set Don't Keep Activities to on
Open the xml demo. Click the message then the android home button. Reopen the demo app. Its should not crash.
Modal should be in state you left it in.

…clientId handling

- Replaced direct constructor calls to ModalFragment with newInstance method across tests and implementation files.
- Added tests to ensure proper state restoration and argument handling for ModalFragment.
- Updated ModalFragment class to include a companion object for argument management, ensuring compatibility with Android's fragment lifecycle.
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

- Introduced unit tests for ModalFragment, validating configuration creation and event handling.
- Added tests for Channel enum and OkHttpCompat utility class, ensuring proper functionality and error handling.
- Updated jacoco.gradle to require XML and CSV report formats for coverage reports.
…lifecycle management

- Updated ModalFragment to use default values for close button properties during recreation, ensuring consistent behavior.
- Improved close button functionality to properly dismiss the fragment, preventing it from being restored unintentionally.
- Enhanced PayPalMessageDataProvider to safely dismiss modals during cleanup, avoiding crashes during activity destruction.
- Added checks to reuse existing modals only if they are still added to the fragment manager, improving resource management.
- Added tests to verify that dismissed ModalFragments are not restored after activity recreation.
- Implemented checks to ensure new instances of ModalFragments are created when showing modals after dismissal.
- Enhanced onCreateView test to handle null close button data gracefully, preventing crashes during fragment recreation.
- Verified that onDismiss callback is invoked correctly when a fragment is dismissed.
@grablack grablack marked this pull request as ready for review November 6, 2025 21:06
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.

2 participants