Changeset View
Changeset View
Standalone View
Standalone View
web/redux/redux-setup.js
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | export type AppState = { | ||||
sessionID: ?string, | sessionID: ?string, | ||||
entryStore: EntryStore, | entryStore: EntryStore, | ||||
threadStore: ThreadStore, | threadStore: ThreadStore, | ||||
userStore: UserStore, | userStore: UserStore, | ||||
messageStore: MessageStore, | messageStore: MessageStore, | ||||
updatesCurrentAsOf: number, | updatesCurrentAsOf: number, | ||||
loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } }, | loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } }, | ||||
calendarFilters: $ReadOnlyArray<CalendarFilter>, | calendarFilters: $ReadOnlyArray<CalendarFilter>, | ||||
communityIDFilter: ?string, | calendarPickedCommunityID: ?string, | ||||
urlPrefix: string, | urlPrefix: string, | ||||
windowDimensions: WindowDimensions, | windowDimensions: WindowDimensions, | ||||
cookie?: void, | cookie?: void, | ||||
deviceToken?: void, | deviceToken?: void, | ||||
baseHref: string, | baseHref: string, | ||||
connection: ConnectionInfo, | connection: ConnectionInfo, | ||||
watchedThreadIDs: $ReadOnlyArray<string>, | watchedThreadIDs: $ReadOnlyArray<string>, | ||||
lifecycleState: LifecycleState, | lifecycleState: LifecycleState, | ||||
▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | return { | ||||
...state, | ...state, | ||||
calendarFilters: [ | calendarFilters: [ | ||||
...nonThreadFilters, | ...nonThreadFilters, | ||||
{ | { | ||||
type: calendarThreadFilterTypes.THREAD_LIST, | type: calendarThreadFilterTypes.THREAD_LIST, | ||||
threadIDs, | threadIDs, | ||||
}, | }, | ||||
], | ], | ||||
communityIDFilter: action.payload, | calendarPickedCommunityID: action.payload, | ||||
}; | }; | ||||
} else if (action.type === clearCalendarCommunityFilter) { | } else if (action.type === clearCalendarCommunityFilter) { | ||||
const nonThreadFilters = nonThreadCalendarFilters(state.calendarFilters); | const nonThreadFilters = nonThreadCalendarFilters(state.calendarFilters); | ||||
return { | return { | ||||
...state, | ...state, | ||||
calendarFilters: nonThreadFilters, | calendarFilters: nonThreadFilters, | ||||
communityIDFilter: null, | calendarPickedCommunityID: null, | ||||
}; | }; | ||||
} else if (action.type === setNewSessionActionType) { | } else if (action.type === setNewSessionActionType) { | ||||
if ( | if ( | ||||
invalidSessionDowngrade( | invalidSessionDowngrade( | ||||
oldState, | oldState, | ||||
action.payload.sessionChange.currentUserInfo, | action.payload.sessionChange.currentUserInfo, | ||||
action.payload.preRequestUserState, | action.payload.preRequestUserState, | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |