diff --git a/lib/types/entry-types.js b/lib/types/entry-types.js --- a/lib/types/entry-types.js +++ b/lib/types/entry-types.js @@ -247,3 +247,9 @@ +calendarQuery: CalendarQuery, +calendarQueryAlreadyUpdated: boolean, }; + +export type FetchRevisionsForEntryPayload = { + +entryID: string, + +text: string, + +deleted: boolean, +}; 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 @@ -35,6 +35,7 @@ CalendarQueryUpdateResult, CalendarQueryUpdateStartingPayload, CalendarQuery, + FetchRevisionsForEntryPayload, } from './entry-types.js'; import type { CalendarFilter, @@ -429,11 +430,7 @@ } | { +type: 'FETCH_REVISIONS_FOR_ENTRY_SUCCESS', - +payload: { - +entryID: string, - +text: string, - +deleted: boolean, - }, + +payload: FetchRevisionsForEntryPayload, +loadingInfo: LoadingInfo, } | { diff --git a/web/modals/history/history-modal.react.js b/web/modals/history/history-modal.react.js --- a/web/modals/history/history-modal.react.js +++ b/web/modals/history/history-modal.react.js @@ -22,6 +22,7 @@ EntryInfo, CalendarQuery, FetchEntryInfosResult, + FetchRevisionsForEntryPayload, } from 'lib/types/entry-types.js'; import { type CalendarFilter } from 'lib/types/filter-types.js'; import type { @@ -211,7 +212,9 @@ ); } - async fetchRevisionsForEntryAction(entryID: string) { + async fetchRevisionsForEntryAction( + entryID: string, + ): Promise { const result = await this.props.fetchRevisionsForEntry({ entryID }); this.setState(prevState => { // This merge here will preserve time ordering correctly