Skip to content

Prevent destroying presented views if preload is called after present #104

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

Merged
merged 2 commits into from
May 31, 2024

Conversation

kiftio
Copy link
Contributor

@kiftio kiftio commented May 30, 2024

What are you trying to accomplish?

  • When preload is called, we destroy old views and add new ones to the cache to avoid memory leaks.
  • If the old view is in the view hierarchy, we may destroy it while it is visible. This PR aims to avoid that, but loading the submitted URL in the existing view if it's visible.

Before you deploy

@kiftio kiftio force-pushed the dk/preload-after-present branch 2 times, most recently from b000191 to 5b1cbd6 Compare May 30, 2024 11:09
@kiftio kiftio force-pushed the dk/preload-after-present branch from 5b1cbd6 to dbacd50 Compare May 30, 2024 11:10
@@ -96,3 +98,17 @@ class CheckoutExceptionAssert(actual: CheckoutException) :
return this
}
}

fun noopDefaultCheckoutEventProcessor(activity: Activity): DefaultCheckoutEventProcessor {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

extract helper for reuse

@kiftio kiftio marked this pull request as ready for review May 30, 2024 11:13
@kiftio kiftio requested a review from a team as a code owner May 30, 2024 11:13
@kiftio kiftio merged commit 284957a into main May 31, 2024
4 checks passed
@kiftio kiftio deleted the dk/preload-after-present branch May 31, 2024 13: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