[Glitch] Update devDependencies (non-major)

Port 4e277f83dc to glitch-soc

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renaud Chaput <renchap@gmail.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
main
renovate[bot] 2024-01-16 19:34:22 +01:00 committed by Claire
parent 8485bedddc
commit d56e9fb873
1 changed files with 8 additions and 14 deletions

View File

@ -59,25 +59,19 @@ export const accountsReducer: Reducer<typeof initialState> = (
return normalizeAccounts(state, action.payload.accounts); return normalizeAccounts(state, action.payload.accounts);
else if (followAccountSuccess.match(action)) { else if (followAccountSuccess.match(action)) {
return state return state
.update( .update(action.payload.relationship.id, (account) =>
action.payload.relationship.id, account?.update('followers_count', (n) => n + 1),
(account) => account?.update('followers_count', (n) => n + 1),
) )
.update( .update(getCurrentUser(), (account) =>
getCurrentUser(), account?.update('following_count', (n) => n + 1),
(account) => account?.update('following_count', (n) => n + 1),
); );
} else if (unfollowAccountSuccess.match(action)) } else if (unfollowAccountSuccess.match(action))
return state return state
.update( .update(action.payload.relationship.id, (account) =>
action.payload.relationship.id, account?.update('followers_count', (n) => Math.max(0, n - 1)),
(account) =>
account?.update('followers_count', (n) => Math.max(0, n - 1)),
) )
.update( .update(getCurrentUser(), (account) =>
getCurrentUser(), account?.update('following_count', (n) => Math.max(0, n - 1)),
(account) =>
account?.update('following_count', (n) => Math.max(0, n - 1)),
); );
else return state; else return state;
}; };