Skip to content

Commit

Permalink
Globals.setConnected handle all possible values
Browse files Browse the repository at this point in the history
  • Loading branch information
ciakov committed Aug 24, 2024
1 parent b077b95 commit 8d55eb4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public void onMethodCall(MethodCall methodCall, MethodChannel.Result result) {
result.success(null);
break;
case "setOffline":
boolean offline = methodCall.argument("offline");
ConnectivityReceiver.instance(context).setConnected(offline ? false : null);
Boolean offline = methodCall.argument("offline");
ConnectivityReceiver.instance(context).setConnected(offline!=null ? !offline : null);
result.success(null);
break;
case "mergeOfflineRegions":
Expand Down

0 comments on commit 8d55eb4

Please sign in to comment.