Merge branch 'fix_url_launch_mode' into 'main'

utils/url_launcher: force opening http(s) links in external browser

Closes #519

See merge request famedly/fluffychat!1089
This commit is contained in:
Krille 2023-02-21 10:43:49 +00:00
commit f526c56df4

View file

@ -84,7 +84,9 @@ class UrlLauncher {
? 'xn--$hostPartPunycode'
: hostPart;
}).join('.');
launchUrlString(uri.replace(host: newHost).toString());
// Force LaunchMode.externalApplication, otherwise url_launcher will default
// to opening links in a webview on mobile platforms.
launchUrlString(uri.replace(host: newHost).toString(), mode: LaunchMode.externalApplication);
}
void openMatrixToUrl() async {