Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3361193
D5644.id18464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5644.id18464.diff
View Options
diff --git a/lib/types/redux-types.js b/lib/types/redux-types.js
--- a/lib/types/redux-types.js
+++ b/lib/types/redux-types.js
@@ -13,6 +13,7 @@
QueueActivityUpdatesPayload,
SetThreadUnreadStatusPayload,
} from './activity-types';
+import type { DraftStore } from './draft-types';
import type { EnabledApps, SupportedApps } from './enabled-apps';
import type {
RawEntryInfo,
@@ -80,6 +81,7 @@
export type BaseAppState<NavInfo: BaseNavInfo> = {
navInfo: NavInfo,
currentUserInfo: ?CurrentUserInfo,
+ draftStore: DraftStore,
entryStore: EntryStore,
threadStore: ThreadStore,
userStore: UserStore,
@@ -537,12 +539,23 @@
+loadingInfo: LoadingInfo,
}
| {
- +type: 'SAVE_DRAFT',
+ +type: 'UPDATE_DRAFT',
+payload: {
+key: string,
- +draft: string,
+ +text: string,
},
}
+ | {
+ +type: 'MOVE_DRAFT',
+ +payload: {
+ +oldKey: string,
+ +newKey: string,
+ },
+ }
+ | {
+ +type: 'SET_DRAFT_STORE_DRAFTS',
+ +payload: $ReadOnlyArray<{ +key: string, +text: string }>,
+ }
| {
+type: 'UPDATE_ACTIVITY_STARTED',
+payload?: void,
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -78,6 +78,7 @@
const defaultState = ({
navInfo: defaultNavInfo,
currentUserInfo: null,
+ draftStore: { drafts: {} },
entryStore: {
entryInfos: {},
daysToEntries: {},
diff --git a/native/redux/state-types.js b/native/redux/state-types.js
--- a/native/redux/state-types.js
+++ b/native/redux/state-types.js
@@ -3,6 +3,7 @@
import type { Orientations } from 'react-native-orientation-locker';
import type { PersistState } from 'redux-persist/src/types';
+import type { DraftStore } from 'lib/types/draft-types';
import type { EnabledApps } from 'lib/types/enabled-apps';
import type { EntryStore } from 'lib/types/entry-types';
import type { CalendarFilter } from 'lib/types/filter-types';
@@ -24,6 +25,7 @@
export type AppState = {
navInfo: NavInfo,
currentUserInfo: ?CurrentUserInfo,
+ draftStore: DraftStore,
entryStore: EntryStore,
threadStore: ThreadStore,
userStore: UserStore,
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -12,6 +12,7 @@
import { isLoggedIn } from 'lib/selectors/user-selectors';
import { invalidSessionDowngrade } from 'lib/shared/account-utils';
import type { Shape } from 'lib/types/core';
+import type { DraftStore } from 'lib/types/draft-types';
import type { EnabledApps } from 'lib/types/enabled-apps';
import type { EntryStore } from 'lib/types/entry-types';
import type { CalendarFilter } from 'lib/types/filter-types';
@@ -42,6 +43,7 @@
navInfo: NavInfo,
deviceID: ?string,
currentUserInfo: ?CurrentUserInfo,
+ draftStore: DraftStore,
sessionID: ?string,
entryStore: EntryStore,
threadStore: ThreadStore,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 3:41 PM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2580347
Default Alt Text
D5644.id18464.diff (2 KB)
Attached To
Mode
D5644: Bring drafts and related actions to redux
Attached
Detach File
Event Timeline
Log In to Comment