fix: add try-catch to _measureHeight() in secure_email_webview.dart #345

Merged
guettlibot merged 1 commits from issue-340-try-catch-measure-height into main 2026-06-01 19:47:56 +00:00
guettlibot commented 2026-06-01 15:55:56 +00:00 (Migrated from codeberg.org)

Summary

  • Wrapped the body of _measureHeight() in secure_email_webview.dart in a try-catch block
  • runJavaScriptReturningResult() can throw when the WebView controller is in a bad state or the page is still loading; the exception now gets silently swallowed, keeping _height at its default value until the next successful measurement
  • No logic changes — identical happy-path behaviour

Verification

  • The change matches the fix prescribed in the issue exactly
  • Minimal, syntactically straightforward change

Closes #340

## Summary - Wrapped the body of `_measureHeight()` in `secure_email_webview.dart` in a `try-catch` block - `runJavaScriptReturningResult()` can throw when the WebView controller is in a bad state or the page is still loading; the exception now gets silently swallowed, keeping `_height` at its default value until the next successful measurement - No logic changes — identical happy-path behaviour ## Verification - The change matches the fix prescribed in the issue exactly - Minimal, syntactically straightforward change Closes #340
Sign in to join this conversation.