Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32810113
D6458.1768034929.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6458.1768034929.diff
View Options
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
@@ -8,6 +8,7 @@
deleteAccountActionTypes,
} from 'lib/actions/user-actions';
import baseReducer from 'lib/reducers/master-reducer';
+import { nonThreadCalendarFilters } from 'lib/selectors/calendar-filter-selectors';
import { mostRecentlyReadThreadSelector } from 'lib/selectors/thread-selectors';
import { isLoggedIn } from 'lib/selectors/user-selectors';
import { invalidSessionDowngrade } from 'lib/shared/account-utils';
@@ -19,6 +20,11 @@
CalendarFilter,
CalendarCommunityFilter,
} from 'lib/types/filter-types';
+import {
+ calendarThreadFilterTypes,
+ clearCalendarCommunityFilter,
+ updateCalendarCommunityFilter,
+} 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';
@@ -139,6 +145,30 @@
))
) {
return oldState;
+ } else if (action.type === updateCalendarCommunityFilter) {
+ const nonThreadFilters = nonThreadCalendarFilters(state.calendarFilters);
+ return {
+ ...state,
+ calendarFilters: [
+ ...nonThreadFilters,
+ {
+ type: calendarThreadFilterTypes.THREAD_LIST,
+ threadIDs: action.payload.threadIDs,
+ },
+ ],
+ communityFilter: {
+ threadIDs: action.payload.threadIDs,
+ },
+ };
+ } else if (action.type === clearCalendarCommunityFilter) {
+ const nonThreadFilters = nonThreadCalendarFilters(state.calendarFilters);
+ return {
+ ...state,
+ calendarFilters: [...nonThreadFilters],
+ communityFilter: {
+ threadIDs: [],
+ },
+ };
}
if (
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 10, 8:48 AM (8 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5914361
Default Alt Text
D6458.1768034929.diff (1 KB)
Attached To
Mode
D6458: [web] Add to calendar filters reducer logic for handling the COMMUNITY filters
Attached
Detach File
Event Timeline
Log In to Comment