Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flutter/lib/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2878,6 +2878,7 @@ Future<bool> canBeBlocked() async {
return access_mode == 'view' || (access_mode.isEmpty && !option);
}

// to-do: web not implemented
Future<void> shouldBeBlocked(RxBool block, WhetherUseRemoteBlock? use) async {
if (use != null && !await use()) {
block.value = false;
Expand Down
5 changes: 4 additions & 1 deletion flutter/lib/common/widgets/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,13 @@ class _WidgetOPState extends State<WidgetOP> {
final String stateMsg = resultMap['state_msg'];
String failedMsg = resultMap['failed_msg'];
final String? url = resultMap['url'];
final bool urlLaunched = (resultMap['url_launched'] as bool?) ?? false;
final authBody = resultMap['auth_body'];
if (_stateMsg != stateMsg || _failedMsg != failedMsg) {
if (_url.isEmpty && url != null && url.isNotEmpty) {
launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
if (!urlLaunched) {
launchUrl(Uri.parse(url), mode: LaunchMode.externalApplication);
}
_url = url;
}
if (authBody != null) {
Expand Down
Loading