1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/main' into upstream-20231104

This commit is contained in:
KMY 2023-11-04 09:10:13 +09:00
commit 52dac50826
80 changed files with 875 additions and 707 deletions

View file

@ -33,8 +33,8 @@ import {
FOLLOW_REQUESTS_EXPAND_REQUEST,
FOLLOW_REQUESTS_EXPAND_SUCCESS,
FOLLOW_REQUESTS_EXPAND_FAIL,
FOLLOW_REQUEST_AUTHORIZE_SUCCESS,
FOLLOW_REQUEST_REJECT_SUCCESS,
authorizeFollowRequestSuccess,
rejectFollowRequestSuccess,
} from '../actions/accounts';
import {
BLOCKS_FETCH_REQUEST,
@ -79,11 +79,7 @@ import {
MUTES_EXPAND_SUCCESS,
MUTES_EXPAND_FAIL,
} from '../actions/mutes';
import {
NOTIFICATIONS_UPDATE,
} from '../actions/notifications';
import { notificationsUpdate } from '../actions/notifications';
const initialListState = ImmutableMap({
next: null,
@ -222,8 +218,8 @@ export default function userLists(state = initialState, action) {
case MENTIONED_USERS_FETCH_FAIL:
case MENTIONED_USERS_EXPAND_FAIL:
return state.setIn(['mentioned_users', action.id, 'isLoading'], false);
case NOTIFICATIONS_UPDATE:
return action.notification.type === 'follow_request' ? normalizeFollowRequest(state, action.notification) : state;
case notificationsUpdate.type:
return action.payload.notification.type === 'follow_request' ? normalizeFollowRequest(state, action.payload.notification) : state;
case FOLLOW_REQUESTS_FETCH_SUCCESS:
return normalizeList(state, ['follow_requests'], action.accounts, action.next);
case FOLLOW_REQUESTS_EXPAND_SUCCESS:
@ -234,9 +230,9 @@ export default function userLists(state = initialState, action) {
case FOLLOW_REQUESTS_FETCH_FAIL:
case FOLLOW_REQUESTS_EXPAND_FAIL:
return state.setIn(['follow_requests', 'isLoading'], false);
case FOLLOW_REQUEST_AUTHORIZE_SUCCESS:
case FOLLOW_REQUEST_REJECT_SUCCESS:
return state.updateIn(['follow_requests', 'items'], list => list.filterNot(item => item === action.id));
case authorizeFollowRequestSuccess.type:
case rejectFollowRequestSuccess.type:
return state.updateIn(['follow_requests', 'items'], list => list.filterNot(item => item === action.payload.id));
case BLOCKS_FETCH_SUCCESS:
return normalizeList(state, ['blocks'], action.accounts, action.next);
case BLOCKS_EXPAND_SUCCESS: