Skip to content

Commit 52f30da

Browse files
committed
fix identation
1 parent 0e1ad81 commit 52f30da

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

android/src/main/java/com/reactnativecommunity/webview/RNCWebChromeClient.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -245,22 +245,23 @@ public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermiss
245245
requestPermissions(Collections.singletonList(Manifest.permission.ACCESS_FINE_LOCATION));
246246

247247
} else {
248-
String alertMessage = String.format("Allow %s to use your location?", origin);
249-
AlertDialog.Builder builder = new AlertDialog.Builder(this.mWebView.getContext());
250-
builder.setMessage(alertMessage);
251-
builder.setCancelable(false);
252-
builder.setPositiveButton("Allow", (dialog, which) -> {
253-
callback.invoke(origin, true, false);
254-
});
255-
builder.setNegativeButton("Don't allow", (dialog, which) -> {
256-
callback.invoke(origin, false, false);
257-
});
258-
AlertDialog alertDialog = builder.create();
259-
alertDialog.show();
260-
//Delay making `allow` clickable for 500ms to avoid unwanted presses.
261-
Button posButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
262-
posButton.setEnabled(false);
263-
this.runDelayed(() -> posButton.setEnabled(true), 500);
248+
String alertMessage = String.format("Allow %s to use your location?", origin);
249+
AlertDialog.Builder builder = new AlertDialog.Builder(this.mWebView.getContext());
250+
builder.setMessage(alertMessage);
251+
builder.setCancelable(false);
252+
builder.setPositiveButton("Allow", (dialog, which) -> {
253+
callback.invoke(origin, true, false);
254+
});
255+
builder.setNegativeButton("Don't allow", (dialog, which) -> {
256+
callback.invoke(origin, false, false);
257+
});
258+
AlertDialog alertDialog = builder.create();
259+
alertDialog.show();
260+
//Delay making `allow` clickable for 500ms to avoid unwanted presses.
261+
Button posButton = alertDialog.getButton(AlertDialog.BUTTON_POSITIVE);
262+
posButton.setEnabled(false);
263+
this.runDelayed(() -> posButton.setEnabled(true), 500);
264+
264265
}
265266
}
266267

0 commit comments

Comments
 (0)