diff --git a/lib/types/filter-types.js b/lib/types/filter-types.js --- a/lib/types/filter-types.js +++ b/lib/types/filter-types.js @@ -10,6 +10,9 @@ typeof calendarThreadFilterTypes, >; +export type CalendarCommunityFilter = { + +threadIDs: $ReadOnlyArray, +}; export type CalendarThreadFilter = { +type: 'threads', +threadIDs: $ReadOnlyArray, @@ -23,6 +26,8 @@ export const updateCalendarThreadFilter = 'UPDATE_CALENDAR_THREAD_FILTER'; export const clearCalendarThreadFilter = 'CLEAR_CALENDAR_THREAD_FILTER'; export const setCalendarDeletedFilter = 'SET_CALENDAR_DELETED_FILTER'; +export const updateCalendarCommunityFilter = 'UPDATE_CALENDAR_COMMUNITY_FILTER'; +export const clearCalendarCommunityFilter = 'CLEAR_CALENDAR_COMMUNITY_FILTER'; export type SetCalendarDeletedFilterPayload = { +includeDeleted: 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 @@ -30,6 +30,7 @@ CalendarFilter, CalendarThreadFilter, SetCalendarDeletedFilterPayload, + CalendarCommunityFilter, } from './filter-types'; import type { LifecycleState } from './lifecycle-state-types'; import type { LoadingStatus, LoadingInfo } from './loading-types'; @@ -679,6 +680,14 @@ +type: 'SET_CALENDAR_DELETED_FILTER', +payload: SetCalendarDeletedFilterPayload, } + | { + +type: 'UPDATE_CALENDAR_COMMUNITY_FILTER', + +payload: CalendarCommunityFilter, + } + | { + +type: 'CLEAR_CALENDAR_COMMUNITY_FILTER', + +payload: void, + } | { +type: 'UPDATE_SUBSCRIPTION_STARTED', +payload?: void, 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 @@ -15,7 +15,10 @@ 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'; +import type { + CalendarFilter, + CalendarCommunityFilter, +} from 'lib/types/filter-types'; import type { LifecycleState } from 'lib/types/lifecycle-state-types'; import type { LoadingStatus } from 'lib/types/loading-types'; import type { MessageStore } from 'lib/types/message-types'; @@ -57,6 +60,7 @@ updatesCurrentAsOf: number, loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } }, calendarFilters: $ReadOnlyArray, + communityFilter: ?CalendarCommunityFilter, urlPrefix: string, windowDimensions: WindowDimensions, cookie?: void,