Skip to content

Commit

Permalink
chore: [IA-715] Cleanup in the Android main activity (#3835)
Browse files Browse the repository at this point in the history
* Remove unused showAlertDialog

* Remove isRootedDeviceFlag

* Change module name

Co-authored-by: Matteo Boschi <[email protected]>
  • Loading branch information
emiliopavia and Undermaken authored Mar 17, 2022
1 parent cddd21a commit dee39e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
11 changes: 1 addition & 10 deletions android/app/src/main/java/it/pagopa/io/app/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@

public class MainActivity extends ReactActivity {

private Boolean isRootedDeviceFlag = null;

/**
* Returns the name of the main component registered from JavaScript. This is
* used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "ItaliaApp";
return "IO";
}

// see
Expand All @@ -47,11 +45,4 @@ protected ReactRootView createRootView() {
}
};
}


private void showAlertDialog(String title, String message) {
new AlertDialog.Builder(MainActivity.this).setTitle(title).setMessage(message)
.setPositiveButton(getString(android.R.string.ok), (dialog, which) -> finish()).setCancelable(false)
.show();
}
}
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "ItaliaApp",
"displayName": "ItaliaApp"
}
"name": "IO",
"displayName": "IO"
}
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {

import { App } from "./ts/App";
import { mixpanel } from "./ts/mixpanel";
import { name as appName } from "./app.json";

const errorHandler = (e, isFatal) => {
if (isFatal) {
Expand Down Expand Up @@ -68,4 +69,4 @@ Text.defaultProps.allowFontScaling = false;
TextInput.defaultProps = TextInput.defaultProps || {};
TextInput.defaultProps.allowFontScaling = false;

AppRegistry.registerComponent("ItaliaApp", () => App);
AppRegistry.registerComponent(appName, () => App);
2 changes: 1 addition & 1 deletion ios/ItaliaApp/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
#endif
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"ItaliaApp"
moduleName:@"IO"
initialProperties:nil];

if (@available(iOS 13.0, *)) {
Expand Down

0 comments on commit dee39e3

Please sign in to comment.