diff --git a/native/data/sensitive-data-cleaner.react.js b/native/data/sensitive-data-handler.react.js
rename from native/data/sensitive-data-cleaner.react.js
rename to native/data/sensitive-data-handler.react.js
--- a/native/data/sensitive-data-cleaner.react.js
+++ b/native/data/sensitive-data-handler.react.js
@@ -6,9 +6,9 @@
import { commCoreModule } from '../native-modules';
import { useSelector } from '../redux/redux-utils';
-function SensitiveDataCleaner(): null {
- const currentLoggedInUserID = useSelector(state =>
- state.currentUserInfo?.anonymous ? null : state.currentUserInfo?.id,
+function SensitiveDataHandler(): null {
+ const currentLoggedInUserID: ?string = useSelector(state =>
+ state.currentUserInfo?.anonymous ? undefined : state.currentUserInfo?.id,
);
React.useEffect(() => {
(async () => {
@@ -23,6 +23,10 @@
if (currentLoggedInUserID) {
await commCoreModule.setCurrentUserID(currentLoggedInUserID);
}
+ const databaseDeviceID = await commCoreModule.getDeviceID();
+ if (!databaseDeviceID) {
+ await commCoreModule.setDeviceID('MOBILE');
+ }
} catch (e) {
if (__DEV__) {
throw e;
@@ -36,4 +40,4 @@
return null;
}
-export { SensitiveDataCleaner };
+export { SensitiveDataHandler };
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -22,7 +22,7 @@
import PersistedStateGate from './components/persisted-state-gate';
import ConnectedStatusBar from './connected-status-bar.react';
import CoreDataProvider from './data/core-data-provider.react';
-import { SensitiveDataCleaner } from './data/sensitive-data-cleaner.react';
+import { SensitiveDataHandler } from './data/sensitive-data-handler.react';
import { SQLiteContextProvider } from './data/sqlite-context-provider';
import ErrorBoundary from './error-boundary.react';
import InputStateContainer from './input/input-state-container.react';
@@ -223,7 +223,7 @@
-
+
>
);
let navigation;