From dec89cb2366a7e1561c90f792776240190980af0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 15:52:25 -0500 Subject: [PATCH 1/2] Remove unused .js files, remove groups --- app/soapbox/actions/group_editor.ts | 143 ----- app/soapbox/actions/groups.ts | 550 ------------------ app/soapbox/components/avatar_composite.js | Bin 1866 -> 0 bytes app/soapbox/components/filter_bar.js | Bin 3716 -> 0 bytes app/soapbox/components/setting_text.js | Bin 844 -> 0 bytes .../components/column_settings.js | Bin 2233 -> 0 bytes .../containers/column_settings_container.js | Bin 542 -> 0 bytes .../components/column_settings.js | Bin 13364 -> 0 bytes .../components/follow_request.js | Bin 2049 -> 0 bytes .../components/multi_setting_toggle.js | Bin 1221 -> 0 bytes .../containers/column_settings_container.js | Bin 2064 -> 0 bytes .../containers/follow_request_container.js | Bin 704 -> 0 bytes .../ui/components/account_list_panel.js | Bin 1719 -> 0 bytes .../reducers/__tests__/group_editor.test.ts | 16 - .../reducers/__tests__/group_lists.test.ts | 13 - .../__tests__/group_relationships.test.ts | 9 - app/soapbox/reducers/__tests__/groups.test.ts | 9 - .../reducers/__tests__/list_editor-test.js | Bin 3345 -> 0 bytes .../reducers/__tests__/notifications-test.js | Bin 20432 -> 0 bytes app/soapbox/reducers/__tests__/search-test.js | Bin 3292 -> 0 bytes app/soapbox/reducers/group_editor.js | Bin 1605 -> 0 bytes app/soapbox/reducers/group_lists.js | Bin 617 -> 0 bytes app/soapbox/reducers/group_relationships.js | Bin 872 -> 0 bytes app/soapbox/reducers/groups.js | Bin 875 -> 0 bytes app/soapbox/reducers/index.ts | 8 - app/soapbox/reducers/timelines.ts | 7 - app/soapbox/reducers/user_lists.ts | 21 +- 27 files changed, 1 insertion(+), 775 deletions(-) delete mode 100644 app/soapbox/actions/group_editor.ts delete mode 100644 app/soapbox/actions/groups.ts delete mode 100644 app/soapbox/components/avatar_composite.js delete mode 100644 app/soapbox/components/filter_bar.js delete mode 100644 app/soapbox/components/setting_text.js delete mode 100644 app/soapbox/features/home_timeline/components/column_settings.js delete mode 100644 app/soapbox/features/home_timeline/containers/column_settings_container.js delete mode 100644 app/soapbox/features/notifications/components/column_settings.js delete mode 100644 app/soapbox/features/notifications/components/follow_request.js delete mode 100644 app/soapbox/features/notifications/components/multi_setting_toggle.js delete mode 100644 app/soapbox/features/notifications/containers/column_settings_container.js delete mode 100644 app/soapbox/features/notifications/containers/follow_request_container.js delete mode 100644 app/soapbox/features/ui/components/account_list_panel.js delete mode 100644 app/soapbox/reducers/__tests__/group_editor.test.ts delete mode 100644 app/soapbox/reducers/__tests__/group_lists.test.ts delete mode 100644 app/soapbox/reducers/__tests__/group_relationships.test.ts delete mode 100644 app/soapbox/reducers/__tests__/groups.test.ts delete mode 100644 app/soapbox/reducers/__tests__/list_editor-test.js delete mode 100644 app/soapbox/reducers/__tests__/notifications-test.js delete mode 100644 app/soapbox/reducers/__tests__/search-test.js delete mode 100644 app/soapbox/reducers/group_editor.js delete mode 100644 app/soapbox/reducers/group_lists.js delete mode 100644 app/soapbox/reducers/group_relationships.js delete mode 100644 app/soapbox/reducers/groups.js diff --git a/app/soapbox/actions/group_editor.ts b/app/soapbox/actions/group_editor.ts deleted file mode 100644 index 23f3491ad6..0000000000 --- a/app/soapbox/actions/group_editor.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { isLoggedIn } from 'soapbox/utils/auth'; - -import api from '../api'; - -import type { AxiosError } from 'axios'; -import type { History } from 'history'; -import type { AppDispatch, RootState } from 'soapbox/store'; -import type { APIEntity } from 'soapbox/types/entities'; - -const GROUP_CREATE_REQUEST = 'GROUP_CREATE_REQUEST'; -const GROUP_CREATE_SUCCESS = 'GROUP_CREATE_SUCCESS'; -const GROUP_CREATE_FAIL = 'GROUP_CREATE_FAIL'; - -const GROUP_UPDATE_REQUEST = 'GROUP_UPDATE_REQUEST'; -const GROUP_UPDATE_SUCCESS = 'GROUP_UPDATE_SUCCESS'; -const GROUP_UPDATE_FAIL = 'GROUP_UPDATE_FAIL'; - -const GROUP_EDITOR_VALUE_CHANGE = 'GROUP_EDITOR_VALUE_CHANGE'; -const GROUP_EDITOR_RESET = 'GROUP_EDITOR_RESET'; -const GROUP_EDITOR_SETUP = 'GROUP_EDITOR_SETUP'; - -const submit = (routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - const groupId = getState().group_editor.get('groupId') as string; - const title = getState().group_editor.get('title') as string; - const description = getState().group_editor.get('description') as string; - const coverImage = getState().group_editor.get('coverImage') as any; - - if (groupId === null) { - dispatch(create(title, description, coverImage, routerHistory)); - } else { - dispatch(update(groupId, title, description, coverImage, routerHistory)); - } - }; - -const create = (title: string, description: string, coverImage: File, routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(createRequest()); - - const formData = new FormData(); - formData.append('title', title); - formData.append('description', description); - - if (coverImage !== null) { - formData.append('cover_image', coverImage); - } - - api(getState).post('/api/v1/groups', formData, { headers: { 'Content-Type': 'multipart/form-data' } }).then(({ data }) => { - dispatch(createSuccess(data)); - routerHistory.push(`/groups/${data.id}`); - }).catch(err => dispatch(createFail(err))); - }; - -const createRequest = (id?: string) => ({ - type: GROUP_CREATE_REQUEST, - id, -}); - -const createSuccess = (group: APIEntity) => ({ - type: GROUP_CREATE_SUCCESS, - group, -}); - -const createFail = (error: AxiosError) => ({ - type: GROUP_CREATE_FAIL, - error, -}); - -const update = (groupId: string, title: string, description: string, coverImage: File, routerHistory: History) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(updateRequest(groupId)); - - const formData = new FormData(); - formData.append('title', title); - formData.append('description', description); - - if (coverImage !== null) { - formData.append('cover_image', coverImage); - } - - api(getState).put(`/api/v1/groups/${groupId}`, formData, { headers: { 'Content-Type': 'multipart/form-data' } }).then(({ data }) => { - dispatch(updateSuccess(data)); - routerHistory.push(`/groups/${data.id}`); - }).catch(err => dispatch(updateFail(err))); - }; - -const updateRequest = (id: string) => ({ - type: GROUP_UPDATE_REQUEST, - id, -}); - -const updateSuccess = (group: APIEntity) => ({ - type: GROUP_UPDATE_SUCCESS, - group, -}); - -const updateFail = (error: AxiosError) => ({ - type: GROUP_UPDATE_FAIL, - error, -}); - -const changeValue = (field: string, value: string | File) => ({ - type: GROUP_EDITOR_VALUE_CHANGE, - field, - value, -}); - -const reset = () => ({ - type: GROUP_EDITOR_RESET, -}); - -const setUp = (group: string) => ({ - type: GROUP_EDITOR_SETUP, - group, -}); - -export { - GROUP_CREATE_REQUEST, - GROUP_CREATE_SUCCESS, - GROUP_CREATE_FAIL, - GROUP_UPDATE_REQUEST, - GROUP_UPDATE_SUCCESS, - GROUP_UPDATE_FAIL, - GROUP_EDITOR_VALUE_CHANGE, - GROUP_EDITOR_RESET, - GROUP_EDITOR_SETUP, - submit, - create, - createRequest, - createSuccess, - createFail, - update, - updateRequest, - updateSuccess, - updateFail, - changeValue, - reset, - setUp, -}; diff --git a/app/soapbox/actions/groups.ts b/app/soapbox/actions/groups.ts deleted file mode 100644 index 808cc3204e..0000000000 --- a/app/soapbox/actions/groups.ts +++ /dev/null @@ -1,550 +0,0 @@ -import { AxiosError } from 'axios'; - -import { isLoggedIn } from 'soapbox/utils/auth'; - -import api, { getLinks } from '../api'; - -import { fetchRelationships } from './accounts'; -import { importFetchedAccounts } from './importer'; - -import type { AppDispatch, RootState } from 'soapbox/store'; -import type { APIEntity } from 'soapbox/types/entities'; - -const GROUP_FETCH_REQUEST = 'GROUP_FETCH_REQUEST'; -const GROUP_FETCH_SUCCESS = 'GROUP_FETCH_SUCCESS'; -const GROUP_FETCH_FAIL = 'GROUP_FETCH_FAIL'; - -const GROUP_RELATIONSHIPS_FETCH_REQUEST = 'GROUP_RELATIONSHIPS_FETCH_REQUEST'; -const GROUP_RELATIONSHIPS_FETCH_SUCCESS = 'GROUP_RELATIONSHIPS_FETCH_SUCCESS'; -const GROUP_RELATIONSHIPS_FETCH_FAIL = 'GROUP_RELATIONSHIPS_FETCH_FAIL'; - -const GROUPS_FETCH_REQUEST = 'GROUPS_FETCH_REQUEST'; -const GROUPS_FETCH_SUCCESS = 'GROUPS_FETCH_SUCCESS'; -const GROUPS_FETCH_FAIL = 'GROUPS_FETCH_FAIL'; - -const GROUP_JOIN_REQUEST = 'GROUP_JOIN_REQUEST'; -const GROUP_JOIN_SUCCESS = 'GROUP_JOIN_SUCCESS'; -const GROUP_JOIN_FAIL = 'GROUP_JOIN_FAIL'; - -const GROUP_LEAVE_REQUEST = 'GROUP_LEAVE_REQUEST'; -const GROUP_LEAVE_SUCCESS = 'GROUP_LEAVE_SUCCESS'; -const GROUP_LEAVE_FAIL = 'GROUP_LEAVE_FAIL'; - -const GROUP_MEMBERS_FETCH_REQUEST = 'GROUP_MEMBERS_FETCH_REQUEST'; -const GROUP_MEMBERS_FETCH_SUCCESS = 'GROUP_MEMBERS_FETCH_SUCCESS'; -const GROUP_MEMBERS_FETCH_FAIL = 'GROUP_MEMBERS_FETCH_FAIL'; - -const GROUP_MEMBERS_EXPAND_REQUEST = 'GROUP_MEMBERS_EXPAND_REQUEST'; -const GROUP_MEMBERS_EXPAND_SUCCESS = 'GROUP_MEMBERS_EXPAND_SUCCESS'; -const GROUP_MEMBERS_EXPAND_FAIL = 'GROUP_MEMBERS_EXPAND_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST = 'GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_FETCH_FAIL = 'GROUP_REMOVED_ACCOUNTS_FETCH_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST = 'GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL = 'GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST = 'GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL = 'GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL'; - -const GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST = 'GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST'; -const GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS = 'GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS'; -const GROUP_REMOVED_ACCOUNTS_CREATE_FAIL = 'GROUP_REMOVED_ACCOUNTS_CREATE_FAIL'; - -const GROUP_REMOVE_STATUS_REQUEST = 'GROUP_REMOVE_STATUS_REQUEST'; -const GROUP_REMOVE_STATUS_SUCCESS = 'GROUP_REMOVE_STATUS_SUCCESS'; -const GROUP_REMOVE_STATUS_FAIL = 'GROUP_REMOVE_STATUS_FAIL'; - -const fetchGroup = (id: string) => (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchGroupRelationships([id])); - - if (getState().groups.get(id)) { - return; - } - - dispatch(fetchGroupRequest(id)); - - api(getState).get(`/api/v1/groups/${id}`) - .then(({ data }) => dispatch(fetchGroupSuccess(data))) - .catch(err => dispatch(fetchGroupFail(id, err))); -}; - -const fetchGroupRequest = (id: string) => ({ - type: GROUP_FETCH_REQUEST, - id, -}); - -const fetchGroupSuccess = (group: APIEntity) => ({ - type: GROUP_FETCH_SUCCESS, - group, -}); - -const fetchGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_FETCH_FAIL, - id, - error, -}); - -const fetchGroupRelationships = (groupIds: string[]) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const loadedRelationships = getState().group_relationships; - const newGroupIds = groupIds.filter(id => loadedRelationships.get(id, null) === null); - - if (newGroupIds.length === 0) { - return; - } - - dispatch(fetchGroupRelationshipsRequest(newGroupIds)); - - api(getState).get(`/api/v1/groups/${newGroupIds[0]}/relationships?${newGroupIds.map(id => `id[]=${id}`).join('&')}`).then(response => { - dispatch(fetchGroupRelationshipsSuccess(response.data)); - }).catch(error => { - dispatch(fetchGroupRelationshipsFail(error)); - }); - }; - -const fetchGroupRelationshipsRequest = (ids: string[]) => ({ - type: GROUP_RELATIONSHIPS_FETCH_REQUEST, - ids, - skipLoading: true, -}); - -const fetchGroupRelationshipsSuccess = (relationships: APIEntity[]) => ({ - type: GROUP_RELATIONSHIPS_FETCH_SUCCESS, - relationships, - skipLoading: true, -}); - -const fetchGroupRelationshipsFail = (error: AxiosError) => ({ - type: GROUP_RELATIONSHIPS_FETCH_FAIL, - error, - skipLoading: true, -}); - -const fetchGroups = (tab: string) => (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchGroupsRequest()); - - api(getState).get('/api/v1/groups?tab=' + tab) - .then(({ data }) => { - dispatch(fetchGroupsSuccess(data, tab)); - dispatch(fetchGroupRelationships(data.map((item: APIEntity) => item.id))); - }) - .catch(err => dispatch(fetchGroupsFail(err))); -}; - -const fetchGroupsRequest = () => ({ - type: GROUPS_FETCH_REQUEST, -}); - -const fetchGroupsSuccess = (groups: APIEntity[], tab: string) => ({ - type: GROUPS_FETCH_SUCCESS, - groups, - tab, -}); - -const fetchGroupsFail = (error: AxiosError) => ({ - type: GROUPS_FETCH_FAIL, - error, -}); - -const joinGroup = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(joinGroupRequest(id)); - - api(getState).post(`/api/v1/groups/${id}/accounts`).then(response => { - dispatch(joinGroupSuccess(response.data)); - }).catch(error => { - dispatch(joinGroupFail(id, error)); - }); - }; - -const leaveGroup = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(leaveGroupRequest(id)); - - api(getState).delete(`/api/v1/groups/${id}/accounts`).then(response => { - dispatch(leaveGroupSuccess(response.data)); - }).catch(error => { - dispatch(leaveGroupFail(id, error)); - }); - }; - -const joinGroupRequest = (id: string) => ({ - type: GROUP_JOIN_REQUEST, - id, -}); - -const joinGroupSuccess = (relationship: APIEntity) => ({ - type: GROUP_JOIN_SUCCESS, - relationship, -}); - -const joinGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_JOIN_FAIL, - id, - error, -}); - -const leaveGroupRequest = (id: string) => ({ - type: GROUP_LEAVE_REQUEST, - id, -}); - -const leaveGroupSuccess = (relationship: APIEntity) => ({ - type: GROUP_LEAVE_SUCCESS, - relationship, -}); - -const leaveGroupFail = (id: string, error: AxiosError) => ({ - type: GROUP_LEAVE_FAIL, - id, - error, -}); - -const fetchMembers = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchMembersRequest(id)); - - api(getState).get(`/api/v1/groups/${id}/accounts`).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(fetchMembersSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(fetchMembersFail(id, error)); - }); - }; - -const fetchMembersRequest = (id: string) => ({ - type: GROUP_MEMBERS_FETCH_REQUEST, - id, -}); - -const fetchMembersSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_MEMBERS_FETCH_SUCCESS, - id, - accounts, - next, -}); - -const fetchMembersFail = (id: string, error: AxiosError) => ({ - type: GROUP_MEMBERS_FETCH_FAIL, - id, - error, -}); - -const expandMembers = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const url = getState().user_lists.groups.get(id)!.next; - - if (url === null) { - return; - } - - dispatch(expandMembersRequest(id)); - - api(getState).get(url).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(expandMembersSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(expandMembersFail(id, error)); - }); - }; - -const expandMembersRequest = (id: string) => ({ - type: GROUP_MEMBERS_EXPAND_REQUEST, - id, -}); - -const expandMembersSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_MEMBERS_EXPAND_SUCCESS, - id, - accounts, - next, -}); - -const expandMembersFail = (id: string, error: AxiosError) => ({ - type: GROUP_MEMBERS_EXPAND_FAIL, - id, - error, -}); - -const fetchRemovedAccounts = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(fetchRemovedAccountsRequest(id)); - - api(getState).get(`/api/v1/groups/${id}/removed_accounts`).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(fetchRemovedAccountsSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(fetchRemovedAccountsFail(id, error)); - }); - }; - -const fetchRemovedAccountsRequest = (id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST, - id, -}); - -const fetchRemovedAccountsSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - id, - accounts, - next, -}); - -const fetchRemovedAccountsFail = (id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_FETCH_FAIL, - id, - error, -}); - -const expandRemovedAccounts = (id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - const url = getState().user_lists.groups_removed_accounts.get(id)!.next; - - if (url === null) { - return; - } - - dispatch(expandRemovedAccountsRequest(id)); - - api(getState).get(url).then(response => { - const next = getLinks(response).refs.find(link => link.rel === 'next'); - - dispatch(importFetchedAccounts(response.data)); - dispatch(expandRemovedAccountsSuccess(id, response.data, next ? next.uri : null)); - dispatch(fetchRelationships(response.data.map((item: APIEntity) => item.id))); - }).catch(error => { - dispatch(expandRemovedAccountsFail(id, error)); - }); - }; - -const expandRemovedAccountsRequest = (id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST, - id, -}); - -const expandRemovedAccountsSuccess = (id: string, accounts: APIEntity[], next: string | null) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - id, - accounts, - next, -}); - -const expandRemovedAccountsFail = (id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL, - id, - error, -}); - -const removeRemovedAccount = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(removeRemovedAccountRequest(groupId, id)); - - api(getState).delete(`/api/v1/groups/${groupId}/removed_accounts?account_id=${id}`).then(response => { - dispatch(removeRemovedAccountSuccess(groupId, id)); - }).catch(error => { - dispatch(removeRemovedAccountFail(groupId, id, error)); - }); - }; - -const removeRemovedAccountRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST, - groupId, - id, -}); - -const removeRemovedAccountSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, - groupId, - id, -}); - -const removeRemovedAccountFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL, - groupId, - id, - error, -}); - -const createRemovedAccount = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(createRemovedAccountRequest(groupId, id)); - - api(getState).post(`/api/v1/groups/${groupId}/removed_accounts?account_id=${id}`).then(response => { - dispatch(createRemovedAccountSuccess(groupId, id)); - }).catch(error => { - dispatch(createRemovedAccountFail(groupId, id, error)); - }); - }; - -const createRemovedAccountRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST, - groupId, - id, -}); - -const createRemovedAccountSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS, - groupId, - id, -}); - -const createRemovedAccountFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVED_ACCOUNTS_CREATE_FAIL, - groupId, - id, - error, -}); - -const groupRemoveStatus = (groupId: string, id: string) => - (dispatch: AppDispatch, getState: () => RootState) => { - if (!isLoggedIn(getState)) return; - - dispatch(groupRemoveStatusRequest(groupId, id)); - - api(getState).delete(`/api/v1/groups/${groupId}/statuses/${id}`).then(response => { - dispatch(groupRemoveStatusSuccess(groupId, id)); - }).catch(error => { - dispatch(groupRemoveStatusFail(groupId, id, error)); - }); - }; - -const groupRemoveStatusRequest = (groupId: string, id: string) => ({ - type: GROUP_REMOVE_STATUS_REQUEST, - groupId, - id, -}); - -const groupRemoveStatusSuccess = (groupId: string, id: string) => ({ - type: GROUP_REMOVE_STATUS_SUCCESS, - groupId, - id, -}); - -const groupRemoveStatusFail = (groupId: string, id: string, error: AxiosError) => ({ - type: GROUP_REMOVE_STATUS_FAIL, - groupId, - id, - error, -}); - -export { - GROUP_FETCH_REQUEST, - GROUP_FETCH_SUCCESS, - GROUP_FETCH_FAIL, - GROUP_RELATIONSHIPS_FETCH_REQUEST, - GROUP_RELATIONSHIPS_FETCH_SUCCESS, - GROUP_RELATIONSHIPS_FETCH_FAIL, - GROUPS_FETCH_REQUEST, - GROUPS_FETCH_SUCCESS, - GROUPS_FETCH_FAIL, - GROUP_JOIN_REQUEST, - GROUP_JOIN_SUCCESS, - GROUP_JOIN_FAIL, - GROUP_LEAVE_REQUEST, - GROUP_LEAVE_SUCCESS, - GROUP_LEAVE_FAIL, - GROUP_MEMBERS_FETCH_REQUEST, - GROUP_MEMBERS_FETCH_SUCCESS, - GROUP_MEMBERS_FETCH_FAIL, - GROUP_MEMBERS_EXPAND_REQUEST, - GROUP_MEMBERS_EXPAND_SUCCESS, - GROUP_MEMBERS_EXPAND_FAIL, - GROUP_REMOVED_ACCOUNTS_FETCH_REQUEST, - GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - GROUP_REMOVED_ACCOUNTS_FETCH_FAIL, - GROUP_REMOVED_ACCOUNTS_EXPAND_REQUEST, - GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_EXPAND_FAIL, - GROUP_REMOVED_ACCOUNTS_REMOVE_REQUEST, - GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, - GROUP_REMOVED_ACCOUNTS_REMOVE_FAIL, - GROUP_REMOVED_ACCOUNTS_CREATE_REQUEST, - GROUP_REMOVED_ACCOUNTS_CREATE_SUCCESS, - GROUP_REMOVED_ACCOUNTS_CREATE_FAIL, - GROUP_REMOVE_STATUS_REQUEST, - GROUP_REMOVE_STATUS_SUCCESS, - GROUP_REMOVE_STATUS_FAIL, - fetchGroup, - fetchGroupRequest, - fetchGroupSuccess, - fetchGroupFail, - fetchGroupRelationships, - fetchGroupRelationshipsRequest, - fetchGroupRelationshipsSuccess, - fetchGroupRelationshipsFail, - fetchGroups, - fetchGroupsRequest, - fetchGroupsSuccess, - fetchGroupsFail, - joinGroup, - leaveGroup, - joinGroupRequest, - joinGroupSuccess, - joinGroupFail, - leaveGroupRequest, - leaveGroupSuccess, - leaveGroupFail, - fetchMembers, - fetchMembersRequest, - fetchMembersSuccess, - fetchMembersFail, - expandMembers, - expandMembersRequest, - expandMembersSuccess, - expandMembersFail, - fetchRemovedAccounts, - fetchRemovedAccountsRequest, - fetchRemovedAccountsSuccess, - fetchRemovedAccountsFail, - expandRemovedAccounts, - expandRemovedAccountsRequest, - expandRemovedAccountsSuccess, - expandRemovedAccountsFail, - removeRemovedAccount, - removeRemovedAccountRequest, - removeRemovedAccountSuccess, - removeRemovedAccountFail, - createRemovedAccount, - createRemovedAccountRequest, - createRemovedAccountSuccess, - createRemovedAccountFail, - groupRemoveStatus, - groupRemoveStatusRequest, - groupRemoveStatusSuccess, - groupRemoveStatusFail, -}; diff --git a/app/soapbox/components/avatar_composite.js b/app/soapbox/components/avatar_composite.js deleted file mode 100644 index 59e4bab96e77e4a6d70e261c1d3f52e04479473f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1866 zcmbVNOLN*V5We#(_Rz-m3>fmdI59Jwp15=}Y43?J0yMF)YpqjK$N#-rJ&+Aa+9@Y_ zpWl93eTbqeYlOSHtbV*yT*A683kWLpJwY-AHzQ$U?m5fQ`fECS*P&m*i-%;fGqF@_ti_4N#%W^->O4WGBcPOWlVjctqsjefw*Qi%~&6*q`%bAq$ z<(VO?zfzJE$bs*X?^Y5t?)a{$x%N>(Xh$Oei3~*sgvrdFDm$nj%d)ajZ4)>hEY5|* zSjc<+vk^64jdg|;zj@+WjCW13Wlr;r2G3KXvw$cxbS83Uz{K`6&QGS~oej_^yY za0`&a_3TFXA>)>d%@&pMeAcsKSrPOU0@h%uNTM$a&-ohPbSz6mb=RjEwXWZD=vrb8 zA>o8HRjmmobpVU8ho++`0S56`@cPqy1E2$*OMbvk3@LUL1%n`s--ZsxxbzMFv$Id5!T$=xa_qB?$OrJZI2ggq z>GS6OD+8cy`RA#xJWgMbfXwJtJ^j6Vd5?ax8fH0s;`y*nkLC9+=!BPB7tA61LJbr5Rsr&rs zJmx8AmpLAMMn_0Vu&H+tS~6~XLi)sC($>mLyx|xIViiOk$T~Z+Gp(B1M`Na~p0k#{cooG3t3t23B7$^o(7q+g?q49b R>KsL#V|uD481mDN{s5z@5`KqRnfoq%ozp_Mbw+-((s|k} zkHczjcVYDUahq?b~)FrC8Ksjo2ik-X|7i=KcG9w zI;SFSE31C$j~&QO)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app/soapbox/features/home_timeline/components/column_settings.js b/app/soapbox/features/home_timeline/components/column_settings.js deleted file mode 100644 index a643c7e17bf378ae6ec269795d467a28ca03cf8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2233 zcmdT_O>f&U488kT@TL?KDWXw}?5HO#<9s~Sjy`-OD}9PSZp2VDMOxxJQF%%NZ#F4-4m3@w?N!zZO{YAq{L-LRwRWs`%fLtiUmVi|kOCW-mmBj>Oe@uM+v=w%!7ClzZpFls4 z`ZN3l+xmVXP0kIj_S{9epvJ&TiMEzQIR@C)GFce#&5LhZ%~m57&_$S!u~=CSt}#IX zDV_uV9JR~6Fk-cKU5dH6WxrakSuyu+0}Eyery_`J+MEO^xvHovk%OIB;!P{_=Nto9 zuln^!3V_BUnVy{uxratLWjRfaDb8X1wqH4Llv4_};wE+k7?0)9Y^x>Ae1QNL1%JT4 zA-i8`%~FzkiWeg+xg7l7^vtq~QOt7^ficzjE8tmXxfSdn0%K0bf)^>NRL$a$Ts9^b zhj6FFiLO%e8GU!e5J>hlAbL`rAM9VRKg)u6ry&S3nMI#N+PQAT8$Zy4zGvgC1pS}& zV04~#Iw)*LuKcB<{mhzV8=HrcpcA%H@cd`mxdnEyKh7T$-e+@>`0bxJ3Dtu`V-Glg zLjzf+)#E_`GH`crr!*R`wr%JVHnnB~FFLa8LE4QiLlQ#Z4YgI;eIuq)j|T4sqS;!g zl6?0J_#yHX_*D;ru9--?ztDyQ&H|_*Cla|sD~>{=j74j5`8>-zTCw1_bn^90Uj+&S@c8HbHQu^+bQ@c$&@WB$&r(eHp zKlqX048}W$hTsCb(f3e}s13c0*i6Urttf1&D*#%g8i}lHL&c%#v}-YCVj}3@9CAVC zDYd#j##-;fDkKKe6MW+jQ|~f6>EI^gdALJIfxofjXVF`*@IcV(p(aiE{EN`!ARJ6@*fdZQ%+w>L`f-EyO8(GwnR30$=-#bH6Ps)z$ z)`{&)Vre-1I5XcoWU+b1g(6piXWySPD#@+jbK+(2eW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FvO@y5y;&SVjRM=y^Ww?EZW#H>ADHz^I@335S$lj9V7j3C9q{_Z3evh6HA1{#x qvrX46E~{TA_~@VQuxSU6wV=TGITqD;(M*62j>nUdit)3-KK=pBoWz9y diff --git a/app/soapbox/features/notifications/containers/follow_request_container.js b/app/soapbox/features/notifications/containers/follow_request_container.js deleted file mode 100644 index c793ac3dee025c1bbf2757a049bf34486812a3fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 704 zcmZva!A`?442JK03g4DWrMoi?X%d1H5*pl5XgwBan4Dd#K1-tQZck@zlc1qptYIW8Lj$i!3w4obGr_-u&VNH4Xi&@w>yo1$g|F_~hk@ z6-c{x+RcS%$Od^<)L9M!K5<+9g^$Rq{?kP?U?X_)F*AgwhxOWJIj=}uEee0WNse#6 zmyA)V85rVWPujh(W_+b*PcFa`R1V8K*k=%bhD?2&b(Se|_EWjAhPn2V6e76*7s-jL zA{OA-{C31vGc_EXBp6`)6Z{_TX>LNRgnz(xtoaSmfDpDU`6|z`U3oRB)3S?Kq z0;O&*HB77PyH(;OIwDoX&SckV)tB)rS74k?op6`#Ta6ptH9Xupb!8z%to^TBt|mJd Ft3N^D@~8j+ diff --git a/app/soapbox/features/ui/components/account_list_panel.js b/app/soapbox/features/ui/components/account_list_panel.js deleted file mode 100644 index 61b703e4fd6edfdb8a19e865ec02b47feaeb7d8c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1719 zcmaJ>O>f&U487-9aF-?l{BiH%0!7h7fNm(d-2=sDTA{X-N%Ypv^?x5F*_E9x%_))| zA0Hn{%jT#J!M)MPpRY%>a4@=o<&n=Rxr^o3g$$Sn6eSJs#{G{^+oowr>}x#b@wilu z&#B`*p^dSv!5huF6slRCX*^@nas)*I9o$Lv4EcB9IM!tS`8?x#c{7+ z@^?O)OMZ>4*JY_&MK@ZJkP6L*xZ&RBA|Q7h9-uBGzIbmdJcza?C~ILY44ik;(!Eev z1HKTd%EB2Ry2S#(k|0@vb1!tMfR3*LNK%cLv3;4+6=u>t;ICF1tP+nJ)NLz!IY~2; zW!hB8*dItABAp*odP_#C#}BYtHj<_|)i!%HAv#x44UOqrjTncsTwQ#PPD7d&7F1##vT*b7Rm46X7p`7&~ZOF9pSpYVb{2gZZyJ)aj z{-Hz4Rb#!p8W5jg(kB$`?*z(Vzk=43Md$qO|4Tju?sg8cggoYA0?YY7kE+FfCeZCl z=a;2_7tKVuV~W(9oNJvN&sDzjd(K~}d0pq>HE;V2%W5WFAn}YVKUwRn5y#jdD6U}a zgDb)PHrJ { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap({ - groupId: null, - isSubmitting: false, - isChanged: false, - title: '', - description: '', - coverImage: null, - })); - }); -}); diff --git a/app/soapbox/reducers/__tests__/group_lists.test.ts b/app/soapbox/reducers/__tests__/group_lists.test.ts deleted file mode 100644 index 46527f6829..0000000000 --- a/app/soapbox/reducers/__tests__/group_lists.test.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; - -import reducer from '../group_lists'; - -describe('group_lists reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap({ - featured: ImmutableList(), - member: ImmutableList(), - admin: ImmutableList(), - })); - }); -}); diff --git a/app/soapbox/reducers/__tests__/group_relationships.test.ts b/app/soapbox/reducers/__tests__/group_relationships.test.ts deleted file mode 100644 index 31e3e354fb..0000000000 --- a/app/soapbox/reducers/__tests__/group_relationships.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Map as ImmutableMap } from 'immutable'; - -import reducer from '../group_relationships'; - -describe('group_relationships reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap()); - }); -}); diff --git a/app/soapbox/reducers/__tests__/groups.test.ts b/app/soapbox/reducers/__tests__/groups.test.ts deleted file mode 100644 index 05b88402f6..0000000000 --- a/app/soapbox/reducers/__tests__/groups.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Map as ImmutableMap } from 'immutable'; - -import reducer from '../groups'; - -describe('groups reducer', () => { - it('should return the initial state', () => { - expect(reducer(undefined, {} as any)).toEqual(ImmutableMap()); - }); -}); diff --git a/app/soapbox/reducers/__tests__/list_editor-test.js b/app/soapbox/reducers/__tests__/list_editor-test.js deleted file mode 100644 index 1b351bca1e9ad8a20471b88ceb29ed4322ca424d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3345 zcmeHJ-*4J55Ps*cxVI!zM72IrbrNc`EfZZk2+znQ20Y~liZ4?q#Q(l??1Tgg4P7^B zTJw-7w$JzZ`|f-vl696NY~YTqfl2U_q(C;0IsLmZ5)xaZYQTjt53@XKO_-rAEb=S? zOH|ufSG}IlKHez<7NW>fX_m>1t>@X}g&DnwX?xi)$$3dlQ(9MF(3G6>>xqhhVm~ zGg&N`T$VyL{rzBZVNhuRiq=yQXh*eh>s--Sz3I~sf{q@=97g^mn0dE;a6g`ny@?m> z2@z7fpq2=(cc;}6_cxiZiQaSl91Z6y;V2o6@+~orLpWcY(uvl`E)@dMRO@UcuB)iV zpKH?HBx(OZFQc*&`5;Vch75w z#$oz!I}AK(9KKDxNypZq$#=K--XT7p@;1Wm#qwD`n{DL|Al(@!V&!xfW}to?`lItB Yx6R}Z(2E&UF#Zr-jc!}RD|u0`UwBBpxBvhE diff --git a/app/soapbox/reducers/__tests__/notifications-test.js b/app/soapbox/reducers/__tests__/notifications-test.js deleted file mode 100644 index 1ea296c60ac558a5c5dcd934fb8b5c2870b5c4bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20432 zcmeHPTT|Oe7JkpK=r@@vV{E`cyfs_p0kgxz27=8dl~l?IyTKx|%wgHFCY&j1}kXom^zjHr*8gD!aql7%XA*AC@h#Qlm@i^;3i%e%p#$Wn?Yjc zGIScTMI@p=TSGkZCbQO|kF!WTkmmmW$@y`w|7-hX|6RX(zQ5nE1o4JD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ztrb%jk8@yU-MaGPsq6v5?oy9mxRqTBMlELglsy-asrk!9&IHFUwM{sPnhTe9hnO!# zwkg`(L6Wjcr}zxBWzV`-odeL2`V_858@-P)w46oI_cIAu1H6QdS5(N+fknoIYjq96 z!B9|i#k}wuM0Sr7J0j+h%)hK*-!RmgRGxM%aQbG2C0)u9vStCe!6?qK|BN>*vYG|E zF~ALyc^z>xGmm*=S@Urnt`zgu_Dqjw>!bK>6vl6l07qc70Xdpr@LzZVH*z!5Q`gV+SA?wX&! zSM?BO`0}IR49lzyoL@%F0MXkWnVHopQ!9Pk@s* zPRd9jiw71ys?}NRysg$Y9j%3sQQ_S{>=n3b#alugw$}Xd?3F#9@h^Y8@SqxfeJQl(gtrR!0&|cII{zNoa zddqWSL+5{{-iqJ!WJ%Ie^)~xuQex|`<8YrSX)kfOY^qmqxJ++<4w}rdDa$)Ad|CNh UOP*NhVFho~{&xBr1$y590n=b0RsaA1 diff --git a/app/soapbox/reducers/__tests__/search-test.js b/app/soapbox/reducers/__tests__/search-test.js deleted file mode 100644 index 497f5b08c3543a864ccc613486f01aee7f06a60d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3292 zcmcImU2EGg6n*cnxNmmAB=0F5lq{?rZ5hor24fV(R%(N6WsU=<1$xu2htJE)*Q#p6r20xGl?Cku9V8e*$-fRJ~QRkia8NxyX8kcIgN^!Apn= zOcPyRTommd7XX{}_2cU1X?1h`@L`>J3wPS!{a=6kbp7!DY4c^ZT5mSV1?H8U?6>@7 zK~h!lN-iWNBF()`1kLJ{infgT-1Eq&OhvJ!ab%;Q^^FpUXK?in4!WK~X>-nNmT9x9 zMFlFSP*jB~2m`5zqCI~A`m(2~irZvyU1fAvR5VNAaGcE*|G0@~=6C(GCM-64n9nc5 zYPy6dGKV%FS#QfiDVi-|N0_98^{-(>USt`q0(U`W&6Hd=hq0MSn)13bYu|rhR=uA- zN-b%yniH8T@*J#Uh8rU9xzJ_zD(rGi*)i*s9rNFDk_{TrrJpck_EGZ@PrNIbqC$5Z zH*=kD7jAXutC}$zaGYIgV9dAv>6p{wZ$N~GI#kJqF%7Em3S#Jv*%?#wNp=*ZQ#yjXxmN-(d1zyy- zb9Y;UCd=3W>2%p2EC49Ta2@kZje#!Xvv_^t<3P^KsuZhWjhms+ta(=>;-2pWa)r1H+f0+GLSLyw$ZOYuTTpES`wl3 z1Ho&8cdMO|=OFYPLkG%q)%Xl_UgqWEE4Oo+rcy|R{t+f70S37)oSX!%=-yBd0CY}n zEWMFD{WJg-Db15)fP@iEEtodtO6}!xv3O>bNL~@e#XRNZ!aNxkqj9-zI~T9vC^&jA z5l>I{VfLAda;%Ql+T4E8u+2_be=$D?wf;w<`c1~Fbw3=aroFz8`F{$Ee+NTzejE-x embyC)zys$EWYT4Jwd(x5Qgvkin&3gh~86mrHHyMQoGGU*lXm1A(r@(G2LBN`S0s5h#_RRQgh2Y z9?vuHjGaQ_+!k{DSWMipAJI~O$S&+T)9 z4#Cs*`y*OAL&Ls*gHukMy1OY@)3*nbQQk1wekw!`w5FWmGUk{QxSP1=Rg`mD7aPcN*%2)VM_d;~oE$Yyc}X_ly7E9qx|GpYvJ6t%yb~5yxDbc* z^{15pBfr%oGm_)JOi9)#UGKZPYLrngKc-Q2Ho)rB!Bmd^7IIv)_ne_B{~3* z;*OZf+kS6Emi#fodsa^jx>cdeJT;M7oyZOLhw7nJ=fUm z4)DGb{6fZP=B|VSOw@ztVy`vv2}-1^&M_8+!S9xrTm@ zjmxc@XHPtM8t E3mk9d#Q*>R diff --git a/app/soapbox/reducers/group_lists.js b/app/soapbox/reducers/group_lists.js deleted file mode 100644 index 25b62648ce882fa5d6f817ae0240d861c76cee98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 617 zcmZvZO;3YB5Qgvkin$dMLho(xLTWY9XvChIDGWLZ3uJeQ9}WNA{V3I%a)90WeBKvU zL$3vn@Q4GTfqSJ!!9z>-p27ngxrq9}1dZ+$EO@S6tfPqMLED$7-E+CW-Mkie`*K$l zo3eztCCipr3HO~@zUh7(jBBmzRe(Dd#yDOO~Ij`<|t+3^9^73+sje|%*z6Sf|I)wn6Kz;*`MUzG8z?Wr)Bo38l^E_DS z$rKJT3n|y@z8Tj^Vs}q=J$-ujYie+81)8z*=7e=_hzTgxkH7Y$5KK%wjQL=x-XRXL x%%Ow?K!t|j+7DS-5$-t&xiDZ>KhML%yw9Sak0(dge$Yw4zp36HS1?6W^aE5Y&M5!@ diff --git a/app/soapbox/reducers/group_relationships.js b/app/soapbox/reducers/group_relationships.js deleted file mode 100644 index f74fdb02edf2069a512333869470c4c10398ff6e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 872 zcma)4TWi8F6n^ioIB&L4;`_vbNH;4^#pqs3tmzE&Mv}6N^uI5cR#I`Yx8$6Y?{>n9 zy5bTp@J4DN0^*`*Bsu0(-9yNDRV*>I<^UtsH%AlCWBtq5-R7`OcF}6Kk2h<)h_^U- ziT3kFf)Dd~gmDOVWVwmgx3yI?dyo3!l?b6RNhPaFG5+9HQwvR)s;h*u;swds58ct6 zn2|H9VG6#GMA8trQx0JI45p3*mA>0T?9|&E)PvwLllX&57_N&40|5eM6^}@I9&l(? zdJ?QQg?QK0T}Ko3uGJbfk!*NrF(zJn)y+yK8OgEELt(oc_4P~oWmbNo8EJ9}SyP&* z!6coyAqgu%fw-6<*xdxig!p7KJ%ev+NPgGUHULs0=$+L+8S74S@CR)7>h57O9j7Z< i8Pvf#=np>Tf4I5~deg`y6CGO@-_?<*(Kxv diff --git a/app/soapbox/reducers/groups.js b/app/soapbox/reducers/groups.js deleted file mode 100644 index 8e301e4681db349bcb0f577e55b59c6ad115c558..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 875 zcmaKq%Wi`(5JmTV#q0tSBKt=^|gZha0_xgboK(srU$GLZA z%*vVzgbTco8i<5lSvE-C3#$G@$OSK-5@^i_%$Q5g7M{mk=l1ROxKEG!ht(lYljC|F zC%2X;nv)C}ujKqg@TN}bi6IvX;QBoPOW4GR^`irXqwr?6d%nh!bX4mMj@6_#nkjJv zRxxCxNRS|fqMl%!xkbgRv(I$!FB5RCZ%miJ%+k)-IGSj0|lPc{(zMU!Kk zG`x$N)R1J9a}ks5Y&lv>=fEne=ApTvvxTZ`wK9O9*oew@ExcC6=$AS2iRPp!5b~xn zC+TD@Nb&nC3c;Q&FdpP5!|V*cjYarfQ=0(Dh@?{oyffB&+2I4R>8si4(K { - return state.updateIn([`group:${groupId}`, 'items'], ImmutableOrderedSet(), ids => (ids as ImmutableOrderedSet).delete(statusId)); -}; - const timelineDequeue = (state: State, timelineId: string) => { const top = state.getIn([timelineId, 'top']); @@ -348,8 +343,6 @@ export default function timelines(state: State = initialState, action: AnyAction return timelineConnect(state, action.timeline); case TIMELINE_DISCONNECT: return timelineDisconnect(state, action.timeline); - case GROUP_REMOVE_STATUS_SUCCESS: - return removeStatusFromGroup(state, action.groupId, action.id); case TIMELINE_REPLACE: return state .update('home', TimelineRecord(), timeline => timeline.withMutations(timeline => { diff --git a/app/soapbox/reducers/user_lists.ts b/app/soapbox/reducers/user_lists.ts index 38017f0bb6..4c84f1836e 100644 --- a/app/soapbox/reducers/user_lists.ts +++ b/app/soapbox/reducers/user_lists.ts @@ -32,13 +32,6 @@ import { import { FAMILIAR_FOLLOWERS_FETCH_SUCCESS, } from '../actions/familiar_followers'; -import { - GROUP_MEMBERS_FETCH_SUCCESS, - GROUP_MEMBERS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS, - GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS, - GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS, -} from '../actions/groups'; import { REBLOGS_FETCH_SUCCESS, FAVOURITES_FETCH_SUCCESS, @@ -82,8 +75,6 @@ export const ReducerRecord = ImmutableRecord({ blocks: ListRecord(), mutes: ListRecord(), directory: ListRecord({ isLoading: true }), - groups: ImmutableMap(), - groups_removed_accounts: ImmutableMap(), pinned: ImmutableMap(), birthday_reminders: ImmutableMap(), familiar_followers: ImmutableMap(), @@ -94,7 +85,7 @@ export type List = ReturnType; type Reaction = ReturnType; type ReactionList = ReturnType; type Items = ImmutableOrderedSet; -type NestedListPath = ['followers' | 'following' | 'reblogged_by' | 'favourited_by' | 'reactions' | 'groups' | 'groups_removed_accounts' | 'pinned' | 'birthday_reminders' | 'familiar_followers', string]; +type NestedListPath = ['followers' | 'following' | 'reblogged_by' | 'favourited_by' | 'reactions' | 'pinned' | 'birthday_reminders' | 'familiar_followers', string]; type ListPath = ['follow_requests' | 'blocks' | 'mutes' | 'directory']; const normalizeList = (state: State, path: NestedListPath | ListPath, accounts: APIEntity[], next?: string | null) => { @@ -170,16 +161,6 @@ export default function userLists(state = ReducerRecord(), action: AnyAction) { case DIRECTORY_FETCH_FAIL: case DIRECTORY_EXPAND_FAIL: return state.setIn(['directory', 'isLoading'], false); - case GROUP_MEMBERS_FETCH_SUCCESS: - return normalizeList(state, ['groups', action.id], action.accounts, action.next); - case GROUP_MEMBERS_EXPAND_SUCCESS: - return appendToList(state, ['groups', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_FETCH_SUCCESS: - return normalizeList(state, ['groups_removed_accounts', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_EXPAND_SUCCESS: - return appendToList(state, ['groups_removed_accounts', action.id], action.accounts, action.next); - case GROUP_REMOVED_ACCOUNTS_REMOVE_SUCCESS: - return removeFromList(state, ['groups_removed_accounts', action.groupId], action.id); case PINNED_ACCOUNTS_FETCH_SUCCESS: return normalizeList(state, ['pinned', action.id], action.accounts, action.next); case BIRTHDAY_REMINDERS_FETCH_SUCCESS: From fd6899b6cba22bc67b0198aa11408dc03ea992b8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 3 Nov 2022 16:20:20 -0500 Subject: [PATCH 2/2] Fix reducers/user_lists test --- app/soapbox/reducers/__tests__/user_lists.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/soapbox/reducers/__tests__/user_lists.test.ts b/app/soapbox/reducers/__tests__/user_lists.test.ts index 5fbd5f1eaf..fa23f845f1 100644 --- a/app/soapbox/reducers/__tests__/user_lists.test.ts +++ b/app/soapbox/reducers/__tests__/user_lists.test.ts @@ -14,8 +14,6 @@ describe('user_lists reducer', () => { blocks: { next: null, items: ImmutableOrderedSet(), isLoading: false }, mutes: { next: null, items: ImmutableOrderedSet(), isLoading: false }, directory: { next: null, items: ImmutableOrderedSet(), isLoading: true }, - groups: {}, - groups_removed_accounts: {}, pinned: {}, birthday_reminders: {}, familiar_followers: {},