Skip to content

Commit 870c86f

Browse files
committed
Cleanup
1 parent a4f6aab commit 870c86f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

android/app/src/main/java/com/compass/app/MainActivity.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import org.json.JSONObject;
1515

1616
public class MainActivity extends BridgeActivity {
17-
public class NativeBridge {
17+
public static class NativeBridge {
1818
@JavascriptInterface
1919
public boolean isNativeApp() {
2020
return true;
@@ -32,9 +32,7 @@ protected void onNewIntent(Intent intent) {
3232
try {
3333
String payload = new JSONObject().put("data", data).toString();
3434
Log.i("CompassApp", "Payload: " + payload);
35-
bridge.getWebView().post(() -> {
36-
bridge.getWebView().evaluateJavascript("oauthRedirect(" + payload + ");", null);
37-
});
35+
bridge.getWebView().post(() -> bridge.getWebView().evaluateJavascript("oauthRedirect(" + payload + ");", null));
3836
} catch (JSONException e) {
3937
Log.i("CompassApp", "Failed to encode JSON payload", e);
4038
}

0 commit comments

Comments
 (0)