Page MenuHomePhabricator

D12177.diff
No OneTemporary

D12177.diff

diff --git a/lib/reducers/entry-reducer.js b/lib/reducers/entry-reducer.js
--- a/lib/reducers/entry-reducer.js
+++ b/lib/reducers/entry-reducer.js
@@ -46,7 +46,6 @@
import { stateSyncSpecs } from '../shared/state-sync/state-sync-specs.js';
import { threadInFilterList } from '../shared/thread-utils.js';
import { updateSpecs } from '../shared/updates/update-specs.js';
-import { isWebPlatform } from '../types/device-types.js';
import { processDMOpsActionType } from '../types/dm-ops.js';
import type { RawEntryInfo, EntryStore } from '../types/entry-types.js';
import type { BaseAction } from '../types/redux-types.js';
@@ -68,37 +67,10 @@
processUpdatesActionType,
} from '../types/update-types.js';
import { authoritativeKeyserverID } from '../utils/authoritative-keyserver.js';
-import { getConfig } from '../utils/config.js';
import { dateString } from '../utils/date-utils.js';
-import { getMessageForException } from '../utils/errors.js';
-import { assertObjectsAreEqual, values } from '../utils/objects.js';
+import { values } from '../utils/objects.js';
import { relyingOnAuthoritativeKeyserver } from '../utils/services-utils.js';
-function assertEntryStoresAreEqual(
- processedEntryStore: EntryStore,
- expectedEntryStore: EntryStore,
- location: string,
- onStateDifference?: (message: string) => mixed,
-) {
- try {
- assertObjectsAreEqual(
- processedEntryStore,
- expectedEntryStore,
- `EntryStore - ${location}`,
- );
- } catch (e) {
- console.log(
- 'Error processing EntryStore ops',
- processedEntryStore,
- expectedEntryStore,
- );
- const message = `Error processing EntryStore ops ${
- getMessageForException(e) ?? '{no exception message}'
- }`;
- onStateDifference?.(message);
- }
-}
-
function daysToEntriesFromEntryInfos(
entryInfos: $ReadOnlyArray<RawEntryInfo>,
): { [day: string]: string[] } {
@@ -233,7 +205,6 @@
entryStore: EntryStore,
action: BaseAction,
newThreadInfos: RawThreadInfos,
- onStateDifference?: (message: string) => mixed,
): ReduceEntryInfosResult {
const { entryInfos, daysToEntries, lastUserInteractionCalendar } = entryStore;
if (
@@ -762,14 +733,6 @@
daysToEntries: daysToEntriesFromEntryInfos(values(entryInfosFromDB)),
lastUserInteractionCalendar,
};
- if (!isWebPlatform(getConfig().platformDetails.platform)) {
- assertEntryStoresAreEqual(
- newStore,
- entryStore,
- action.type,
- onStateDifference,
- );
- }
return {
entryStore: newStore,
entryStoreOperations: [],
diff --git a/lib/reducers/master-reducer.js b/lib/reducers/master-reducer.js
--- a/lib/reducers/master-reducer.js
+++ b/lib/reducers/master-reducer.js
@@ -60,12 +60,7 @@
entryStore,
reportCreationRequests: newEntryInconsistencies,
entryStoreOperations,
- } = reduceEntryInfos(
- state.entryStore,
- action,
- threadInfos,
- onStateDifference,
- );
+ } = reduceEntryInfos(state.entryStore, action, threadInfos);
const onStateDifferenceForStaff = (message: string) => {
const isCurrentUserStaff = state.currentUserInfo?.id

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 11:26 PM (20 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572781
Default Alt Text
D12177.diff (3 KB)

Event Timeline