Skip to content

Commit 737507f

Browse files
committed
Improved readability
1 parent a5c7a3b commit 737507f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/widgets/webviews/webview_full.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
11781178
_terminalProvider.terminal = "Terminal";
11791179

11801180
// Userscripts initial load
1181-
if (Platform.isAndroid || (Platform.isIOS && widget.windowId == null) || Platform.isWindows && widget.windowId == null) {
1181+
if (Platform.isAndroid || ((Platform.isIOS || Platform.isWindows) && widget.windowId == null)) {
11821182
UnmodifiableListView<UserScript> handlersScriptsToAdd = _userScriptsProvider.getHandlerSources(
11831183
apiKey: _userProvider?.basic?.userApiKey ?? "",
11841184
);
@@ -1298,7 +1298,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
12981298
final lockedTabCancels = _lockedTabShouldCancelsNavigation(action.request.url);
12991299
if (lockedTabCancels) return NavigationActionPolicy.CANCEL;
13001300

1301-
if (Platform.isAndroid || (Platform.isIOS && widget.windowId == null) || Platform.isWindows && widget.windowId == null) {
1301+
if (Platform.isAndroid || ((Platform.isIOS || Platform.isWindows) && widget.windowId == null)) {
13021302
// Userscripts load before webpage begins loading
13031303
UnmodifiableListView<UserScript> handlersScriptsToAdd = _userScriptsProvider.getHandlerSources(
13041304
apiKey: _userProvider?.basic?.userApiKey ?? "",
@@ -1501,7 +1501,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
15011501
List<String?> scriptsToRemove = _userScriptsProvider.getScriptsToRemove(
15021502
url: uri.toString(),
15031503
);
1504-
if (Platform.isAndroid || (Platform.isIOS && widget.windowId == null)) {
1504+
if (Platform.isAndroid || ((Platform.isIOS || Platform.isWindows) && widget.windowId == null)) {
15051505
for (final group in scriptsToRemove) {
15061506
await c.removeUserScriptsByGroupName(groupName: group!);
15071507
}
@@ -4992,7 +4992,7 @@ class WebViewFullState extends State<WebViewFull> with WidgetsBindingObserver {
49924992

49934993
inputUrl.replaceAll("http://", "https://");
49944994

4995-
if (Platform.isAndroid || (Platform.isIOS && widget.windowId == null)) {
4995+
if (Platform.isAndroid || ((Platform.isIOS || Platform.isWindows) && widget.windowId == null)) {
49964996
// Loads userscripts that are not triggered in shouldOverrideUrlLoading
49974997
// (e.g.: when reloading a page or navigating back/forward)
49984998
UnmodifiableListView<UserScript> scriptsToAdd = _userScriptsProvider.getCondSources(

0 commit comments

Comments
 (0)