Skip to content

Commit 1b44a6f

Browse files
committed
content [nfc]: Cut down TODOs on _launchUrl, following investigation
The second TODO, about the behavior of externalApplication, turns out to be just how things work these days on Android: #74 (comment) The first one, about the behavior of inAppWebView or platformDefault, I've filed as #279. I also added a number of details on the upstream issue, and cross-linked it with a couple of other issues that would be fixed by the same solution.
1 parent 5e6a0ec commit 1b44a6f

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

lib/widgets/content.dart

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -693,19 +693,9 @@ void _launchUrl(BuildContext context, String urlString) async {
693693
try {
694694
launched = await ZulipBinding.instance.launchUrl(url,
695695
mode: switch (Theme.of(context).platform) {
696-
// TODO(upstream) The url_launcher default on Android is a weird UX:
697-
// opens a webview in-app, but on a blank black background.
698-
// The status bar is hidden:
699-
// https://github.com/flutter/flutter/issues/120883
700-
// but also there's no app bar, no location bar, no share button;
701-
// no browser chrome at all.
702-
// Probably what we really want is a "Chrome custom tab":
703-
// https://github.com/flutter/flutter/issues/18589
704-
// TODO(upstream) With url_launcher's LaunchMode.externalApplication
705-
// on Android, we still don't get the normal Android UX for
706-
// opening a URL in a browser, where the system gives the user
707-
// a bit of UI to choose which browser to use:
708-
// https://github.com/zulip/zulip-flutter/issues/74#issuecomment-1514040730
696+
// TODO(#279): On Android we settle for LaunchMode.externalApplication
697+
// because url_launcher's in-app is a weirdly bare UX.
698+
// Switch once that's fixed upstream (by us or otherwise).
709699
TargetPlatform.android => UrlLaunchMode.externalApplication,
710700
_ => UrlLaunchMode.platformDefault,
711701
},

0 commit comments

Comments
 (0)