Skip to content

Conversation

@Ayyanchira
Copy link
Member

@Ayyanchira Ayyanchira commented Sep 30, 2025

Needs reduction in code. Lot of repition. Heavy review and testing needed. Committing as inapps are looking stable and are sticking with the layout with back to back phone rotations when inapp performance would fail usually

🔹 Jira Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

Needs reduction in code. Lot of repition. Heavy review and testing needed. Committing as inapps are looking stable and are sticking with the layout with back to back phone rotations when inapp performance would fail usually
private String messageId;

// Resize debouncing fields
private Handler resizeHandler = new Handler();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
Handler.Handler
should be avoided because it has been deprecated.
lastOrientation = currentOrientation;

// Use longer delay for orientation changes to allow layout to stabilize
final Handler handler = new Handler();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
Handler.Handler
should be avoided because it has been deprecated.
@Ayyanchira Ayyanchira force-pushed the MOB-11663-InApp-Calculations branch from 2cc8a75 to 8e15c0a Compare October 29, 2025 21:13
Copy link
Member Author

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

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

Initial pass done

Comment on lines +212 to +215
if (loaded && webView != null) {
// Only trigger on significant orientation changes (90 degree increments)
int currentOrientation = ((orientation + 45) / 90) * 90;
if (currentOrientation != lastOrientation && lastOrientation != -1) {
lastOrientation = currentOrientation;

// Use longer delay for orientation changes to allow layout to stabilize
Copy link
Member Author

Choose a reason for hiding this comment

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

This allows for resize script to be called only limted number of times. This method when implemented, felt it was only called when landscape to portrait rotation was made. Hence explicit conditioning is required.

And removed unnecessary logging
@Ayyanchira Ayyanchira force-pushed the MOB-11663-InApp-Calculations branch from 54b0276 to e85d78a Compare October 30, 2025 21:25
@Ayyanchira Ayyanchira marked this pull request as ready for review October 30, 2025 22:02
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.

5 participants