Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3385796
D6844.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D6844.diff
View Options
diff --git a/native/crash.react.js b/native/crash.react.js
--- a/native/crash.react.js
+++ b/native/crash.react.js
@@ -13,7 +13,6 @@
ScrollView,
ActivityIndicator,
} from 'react-native';
-import ExitApp from 'react-native-exit-app';
import {
sendReportActionTypes,
@@ -44,6 +43,7 @@
import Button from './components/button.react.js';
import ConnectedStatusBar from './connected-status-bar.react.js';
+import { commCoreModule } from './native-modules.js';
import { persistConfig, codeVersion } from './redux/persist.js';
import { useSelector } from './redux/redux-utils.js';
import { wipeAndExit } from './utils/crash-utils.js';
@@ -183,7 +183,7 @@
if (!this.state.doneWaiting) {
return;
}
- ExitApp.exitApp();
+ commCoreModule.terminate();
};
onPressWipe = async () => {
diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js
--- a/native/data/sqlite-data-handler.js
+++ b/native/data/sqlite-data-handler.js
@@ -2,7 +2,6 @@
import * as React from 'react';
import { Alert } from 'react-native';
-import ExitApp from 'react-native-exit-app';
import { useDispatch } from 'react-redux';
import { setClientDBStoreActionType } from 'lib/actions/client-db-store-actions.js';
@@ -57,7 +56,7 @@
}. Please kill the app.`,
);
} else {
- ExitApp.exitApp();
+ commCoreModule.terminate();
}
}
},
@@ -104,7 +103,7 @@
throw e;
} else {
console.log(e);
- ExitApp.exitApp();
+ commCoreModule.terminate();
}
}
}, [callClearSensitiveData, currentLoggedInUserID]);
@@ -124,7 +123,7 @@
throw e;
} else {
console.log(e);
- ExitApp.exitApp();
+ commCoreModule.terminate();
}
}
await callFetchNewCookieFromNativeCredentials(
diff --git a/native/profile/dev-tools.react.js b/native/profile/dev-tools.react.js
--- a/native/profile/dev-tools.react.js
+++ b/native/profile/dev-tools.react.js
@@ -2,7 +2,6 @@
import * as React from 'react';
import { View, Text, Platform } from 'react-native';
-import ExitApp from 'react-native-exit-app';
import { ScrollView } from 'react-native-gesture-handler';
import { useDispatch } from 'react-redux';
@@ -12,6 +11,7 @@
import type { ProfileNavigationProp } from './profile.react.js';
import Button from '../components/button.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
+import { commCoreModule } from '../native-modules.js';
import type { NavigationRoute } from '../navigation/route-names.js';
import { CustomServerModalRouteName } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
@@ -151,7 +151,7 @@
};
onPressKill = () => {
- ExitApp.exitApp();
+ commCoreModule.terminate();
};
onPressWipe = async () => {
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -1,7 +1,6 @@
// @flow
import { AppState as NativeAppState, Platform, Alert } from 'react-native';
-import ExitApp from 'react-native-exit-app';
import Orientation from 'react-native-orientation-locker';
import { createStore, applyMiddleware, type Store, compose } from 'redux';
import { persistStore, persistReducer } from 'redux-persist';
@@ -410,7 +409,7 @@
if (isTaskCancelledError(e)) {
return;
}
- ExitApp.exitApp();
+ commCoreModule.terminate();
}
})();
diff --git a/native/utils/crash-utils.js b/native/utils/crash-utils.js
--- a/native/utils/crash-utils.js
+++ b/native/utils/crash-utils.js
@@ -1,10 +1,10 @@
// @flow
import AsyncStorage from '@react-native-async-storage/async-storage';
-import ExitApp from 'react-native-exit-app';
import sleep from 'lib/utils/sleep.js';
+import { commCoreModule } from '../native-modules.js';
import { navStateAsyncStorageKey } from '../navigation/persistance.js';
import { getPersistor } from '../redux/persist.js';
@@ -14,7 +14,7 @@
__DEV__ ? AsyncStorage.removeItem(navStateAsyncStorageKey) : null,
]);
await sleep(50);
- ExitApp.exitApp();
+ commCoreModule.terminate();
}
export { wipeAndExit };
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 2:20 AM (20 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599054
Default Alt Text
D6844.diff (4 KB)
Attached To
Mode
D6844: [native] Replaced react-native-exit-app calls with CommCoreModule calls
Attached
Detach File
Event Timeline
Log In to Comment