Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32607427
D6731.1767443645.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D6731.1767443645.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
@@ -65,7 +65,7 @@
updatesCurrentAsOf: number,
loadingStatuses: { [key: string]: { [idx: number]: LoadingStatus } },
calendarFilters: $ReadOnlyArray<CalendarFilter>,
- communityIDFilter: ?string,
+ calendarPickedCommunityID: ?string,
urlPrefix: string,
windowDimensions: WindowDimensions,
cookie?: void,
@@ -141,14 +141,14 @@
threadIDs,
},
],
- communityIDFilter: action.payload,
+ calendarPickedCommunityID: action.payload,
};
} else if (action.type === clearCalendarCommunityFilter) {
const nonThreadFilters = nonThreadCalendarFilters(state.calendarFilters);
return {
...state,
calendarFilters: nonThreadFilters,
- communityIDFilter: null,
+ calendarPickedCommunityID: null,
};
} else if (action.type === setNewSessionActionType) {
if (
diff --git a/web/selectors/calendar-selectors.js b/web/selectors/calendar-selectors.js
--- a/web/selectors/calendar-selectors.js
+++ b/web/selectors/calendar-selectors.js
@@ -44,19 +44,27 @@
const filterThreadIDsBelongingToCommunitySelector: (
state: AppState,
) => ?$ReadOnlySet<string> = createSelector(
- (state: AppState) => state.communityIDFilter,
+ (state: AppState) => state.calendarPickedCommunityID,
threadInfoSelector,
- (communityIDFilter: ?string, threadInfos: { +[id: string]: ThreadInfo }) => {
- if (!communityIDFilter) {
+ (
+ calendarPickedCommunityID: ?string,
+ threadInfos: { +[id: string]: ThreadInfo },
+ ) => {
+ if (!calendarPickedCommunityID) {
return null;
}
- return filterThreadIDsBelongingToCommunity(communityIDFilter, threadInfos);
+ return filterThreadIDsBelongingToCommunity(
+ calendarPickedCommunityID,
+ threadInfos,
+ );
},
);
function useCommunityIsPicked(communityID: string): boolean {
- const communityIDFilter = useSelector(state => state.communityIDFilter);
- return communityID === communityIDFilter;
+ const calendarPickedCommunityID = useSelector(
+ state => state.calendarPickedCommunityID,
+ );
+ return communityID === calendarPickedCommunityID;
}
export {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 3, 12:34 PM (2 m, 39 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5888577
Default Alt Text
D6731.1767443645.diff (2 KB)
Attached To
Mode
D6731: [web] Change the name of communityIDFilter field to calendarPickedCommunityID
Attached
Detach File
Event Timeline
Log In to Comment