Skip to content

Instabug 64/ Debug crash in WebView dropdown#718

Merged
lealobanov merged 7 commits intodevelopfrom
instabug-64
May 19, 2025
Merged

Instabug 64/ Debug crash in WebView dropdown#718
lealobanov merged 7 commits intodevelopfrom
instabug-64

Conversation

@lealobanov
Copy link
Copy Markdown
Contributor

@lealobanov lealobanov commented Mar 18, 2025

Related Issue

Closes #???

Summary of Changes

  • Bump CrowdIn dependency to latest version
  • Context wrap LilicoWebView to properly handle framework resource lookups
  1. Check for Crowdin's translations
  2. Fall back to app resources
  3. Fall back to framework resources if needed

Need Regression Testing

  • Yes
  • No

Risk Assessment

  • Low
  • Medium
  • High

Additional Notes

Screenshots (if applicable)

@lealobanov lealobanov changed the title Debug crash in WebView dropdown Instabug 64/ Debug crash in WebView dropdown Mar 18, 2025
@lmcmz lmcmz modified the milestones: Release 2.8.6, Release 2.8.5 May 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2025

PR Summary

Fixed a crash in WebView dropdown by properly wrapping context with CrowdIn. Upgraded CrowdIn SDK to version 1.13.1 and improved its initialization. Removed unnecessary onPause override in DeepLinkingActivity.

Changes

File Summary
app/build.gradle Updated CrowdIn mobile SDK version from 1.9.2 to 1.13.1 while maintaining gson exclusion.
app/src/main/java/com/flowfoundation/wallet/FlowWalletApplication.kt Added crowdinInitialize() call in application's onCreate() to properly initialize CrowdIn SDK.
app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt Removed unnecessary empty line in CrowdIn initialization utility file.
app/src/main/java/com/flowfoundation/wallet/page/browser/widgets/LilicoWebView.kt Modified WebView constructors to wrap context with Crowdin.wrapContext() to prevent crashes in dropdown menus.
app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt Removed unnecessary onPause() override since coroutine handles the activity finishing.

autogenerated by presubmit.ai

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (2)
  • 0b384ae: Pull latest changes
  • 5f3bf05: Debug crash in WebView dropdown
Files Processed (4)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt (1 hunk)
  • app/src/main/res/layout/activity_webview.xml (1 hunk)
  • app/src/main/res/layout/webview_dropdown_item.xml (1 hunk)
  • app/src/main/res/values/webview_styles.xml (1 hunk)
Actionable Comments (0)
Skipped Comments (2)
  • app/src/main/res/layout/webview_dropdown_item.xml [2-13]

    enhancement: "Consider accessibility improvements for dropdown items"

  • app/src/main/res/values/webview_styles.xml [15-16]

    best practice: "Avoid hardcoding text colors"

@lealobanov lealobanov marked this pull request as ready for review May 19, 2025 07:27
@lealobanov lealobanov requested a review from a team as a code owner May 19, 2025 07:27
Copy link
Copy Markdown

@github-actions github-actions Bot 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 needs attention.

Review Summary

Commits Considered (1)
Files Processed (3)
  • app/build.gradle (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/FlowWalletApplication.kt (2 hunks)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt (1 hunk)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/component/deeplinking/DeepLinkingActivity.kt [81-82]

    possible bug: "Incomplete exception handling in URI validation"

Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/FlowWalletApplication.kt [13-13]

    best practice: "Add error handling for third-party SDK initialization"

Comment on lines 81 to 82
return try {
val uriString = uri.toString()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The isWalletConnectUri() method has a try block but the corresponding catch block is not shown in the diff. Ensure proper exception handling is implemented to avoid potential crashes when parsing invalid URIs.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
Files Processed (1)
  • app/build.gradle (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • app/build.gradle [350-350]

    best practice: "Consider specifying version constraints for dependency"

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
Files Processed (1)
  • app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt [15-15]

    maintainability: "Missing documentation for critical configuration change"

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

LGTM!

Review Summary

Commits Considered (1)
Files Processed (1)
  • app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt [14-14]

    maintainability: "Documentation needed for important configuration setting"

Copy link
Copy Markdown

@github-actions github-actions Bot 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 needs attention.

Review Summary

Commits Considered (1)
Files Processed (2)
  • app/src/main/java/com/flowfoundation/wallet/crowdin/CrowdinUtils.kt (1 hunk)
  • app/src/main/java/com/flowfoundation/wallet/page/browser/widgets/LilicoWebView.kt (2 hunks)
Actionable Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/browser/widgets/LilicoWebView.kt [67-71]

    possible bug: "Missing initialization call in constructor"

Skipped Comments (1)
  • app/src/main/java/com/flowfoundation/wallet/page/browser/widgets/LilicoWebView.kt [59-65]

    maintainability: "Repeated context wrapping logic in constructors"

Comment on lines 67 to 71
constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(
context,
Crowdin.wrapContext(context),
attrs,
defStyleAttr
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The third constructor is missing initWebView() call that is present in the other two constructors. This inconsistency could lead to incomplete initialization of the WebView when using this constructor.

@lealobanov lealobanov requested review from jaymengxy and lmcmz May 19, 2025 08:45
@lealobanov lealobanov merged commit a525466 into develop May 19, 2025
6 checks passed
@lealobanov lealobanov deleted the instabug-64 branch May 19, 2025 15:17
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