Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3253542
D12153.id42677.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12153.id42677.diff
View Options
diff --git a/native/redux/persist.js b/native/redux/persist.js
--- a/native/redux/persist.js
+++ b/native/redux/persist.js
@@ -81,6 +81,7 @@
} from 'lib/types/alert-types.js';
import { defaultEnabledApps } from 'lib/types/enabled-apps.js';
import { defaultCalendarQuery } from 'lib/types/entry-types.js';
+import type { EntryStore } from 'lib/types/entry-types.js';
import { defaultCalendarFilters } from 'lib/types/filter-types.js';
import type { KeyserverInfo } from 'lib/types/keyserver-types.js';
import {
@@ -1345,6 +1346,19 @@
{ whitelist: ['reportStore'] },
);
+type PersistedEntryStore = {
+ +lastUserInteractionCalendar: number,
+};
+const entryStoreTransform: Transform = createTransform(
+ (state: EntryStore): PersistedEntryStore => {
+ return { lastUserInteractionCalendar: state.lastUserInteractionCalendar };
+ },
+ (state: PersistedEntryStore): EntryStore => {
+ return { ...state, entryInfos: {}, daysToEntries: {} };
+ },
+ { whitelist: ['entryStore'] },
+);
+
const migrations = {
// This migration doesn't change the store but sets a persisted version
// in the DB
@@ -1451,6 +1465,7 @@
messageStoreMessagesBlocklistTransform,
reportStoreTransform,
keyserverStoreTransform,
+ entryStoreTransform,
],
migrate: (createAsyncMigrate(
legacyMigrations,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 7:10 PM (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2501129
Default Alt Text
D12153.id42677.diff (1 KB)
Attached To
Mode
D12153: [native] Persist only lastUserInteractionCalendar from the entry store
Attached
Detach File
Event Timeline
Log In to Comment