Page MenuHomePhabricator

D5500.diff
No OneTemporary

D5500.diff

diff --git a/native/data/sensitive-data-handler.react.js b/native/data/sensitive-data-cleaner.react.js
rename from native/data/sensitive-data-handler.react.js
rename to native/data/sensitive-data-cleaner.react.js
--- a/native/data/sensitive-data-handler.react.js
+++ b/native/data/sensitive-data-cleaner.react.js
@@ -6,9 +6,9 @@
import { commCoreModule } from '../native-modules';
import { useSelector } from '../redux/redux-utils';
-function SensitiveDataHandler(): null {
- const currentLoggedInUserID: ?string = useSelector(state =>
- state.currentUserInfo?.anonymous ? undefined : state.currentUserInfo?.id,
+function SensitiveDataCleaner(): null {
+ const currentLoggedInUserID = useSelector(state =>
+ state.currentUserInfo?.anonymous ? null : state.currentUserInfo?.id,
);
React.useEffect(() => {
(async () => {
@@ -23,10 +23,6 @@
if (currentLoggedInUserID) {
await commCoreModule.setCurrentUserID(currentLoggedInUserID);
}
- const databaseDeviceID = await commCoreModule.getDeviceID();
- if (!databaseDeviceID) {
- await commCoreModule.setDeviceID('MOBILE');
- }
} catch (e) {
if (__DEV__) {
throw e;
@@ -40,4 +36,4 @@
return null;
}
-export { SensitiveDataHandler };
+export { SensitiveDataCleaner };
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 { SensitiveDataHandler } from './data/sensitive-data-handler.react';
+import { SensitiveDataCleaner } from './data/sensitive-data-cleaner.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 />
- <SensitiveDataHandler />
+ <SensitiveDataCleaner />
</>
);
let navigation;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 10:55 AM (18 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2497575
Default Alt Text
D5500.diff (2 KB)

Event Timeline