Browse Source

Merge pull request #243 from provokateurin/fix/login-open-browser

neon: Fix browser not opening on login page
pull/244/head
Kate 2 years ago committed by GitHub
parent
commit
32edd92c61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/neon/lib/src/pages/login.dart

10
packages/neon/lib/src/pages/login.dart

@ -32,15 +32,15 @@ class _LoginPageState extends State<LoginPage> {
_loginBloc.setServerURL(widget.serverURL);
}
_loginBloc.loginFlowInit.listen((final init) {
if (init != null && !Provider.of<NeonPlatform>(context, listen: false).canUseWebView) {
WidgetsBinding.instance.addPostFrameCallback((final _) async {
WidgetsBinding.instance.addPostFrameCallback((final _) {
_loginBloc.loginFlowInit.listen((final init) async {
if (init != null && !Provider.of<NeonPlatform>(context, listen: false).canUseWebView) {
await launchUrlString(
init.login,
mode: LaunchMode.externalApplication,
);
});
}
}
});
});
_loginBloc.loginFlowResult.listen((final result) async {

Loading…
Cancel
Save