Skip to content

Conversation

Ayyanchira
Copy link
Member

@Ayyanchira Ayyanchira commented Nov 19, 2024

🔹 Jira Ticket(s) if any

✏️ Description

Removing treeobserver as the html would keep calling this callback even after the page was finished loading. This method was used as an additional measure to make sure inapps are resized in situation when inapps were still not displayed after finished loading. This fix adds delay of 100ms which seems to resolve inapps on Pixel 6pro and still making it all work on Pixel 8 device, needing the SDK to not rely on tree observers.

@Ayyanchira Ayyanchira requested a review from evantk91 November 19, 2024 01:29
Removing treeobserver as the html would keep calling this callback even after the page was finished loading. This method was used as an additional measure to make sure inapps are resized in situation when inapps were still not displayed after finished loading.
This fix adds delay of 100ms which seems to resolve inapps on Pixel 6pro and still making it all work on Pixel 8 device, needing the SDK to not rely on tree observers.
@Ayyanchira Ayyanchira force-pushed the MOB-9211-InApp-Bug-Fix branch from eebd6bb to 08e3ea0 Compare November 19, 2024 18:09
public void onPageFinished(WebView view, String url) {
inAppHTMLNotification.setLoaded(true);
inAppHTMLNotification.runResizeScript();
view.postDelayed(inAppHTMLNotification::runResizeScript, 100);
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see. So you are just setting the script to run once after page finishes loading

Copy link
Contributor

@evantk91 evantk91 left a comment

Choose a reason for hiding this comment

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

Looks good. Tested with all positions with both pixel 6 pro and pixel 8 emulator on API 34.

@Ayyanchira Ayyanchira merged commit 64d89bf into master Nov 20, 2024
4 checks passed
@Ayyanchira Ayyanchira deleted the MOB-9211-InApp-Bug-Fix branch November 20, 2024 21:56
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