Page MenuHomePhabricator

D5444.diff
No OneTemporary

D5444.diff

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 @@
<ConnectivityUpdater />
<ThemeHandler />
<OrientationHandler />
- <SensitiveDataCleaner />
+ <SensitiveDataHandler />
</>
);
let navigation;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 8:21 PM (20 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2602255
Default Alt Text
D5444.diff (2 KB)

Event Timeline