From d56e9fb873526a95d0bd559bf308f5f1cc72739c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 19:34:22 +0100 Subject: [PATCH] [Glitch] Update devDependencies (non-major) Port 4e277f83dc740b3a842c7fd8ed167c3c76fcabf8 to glitch-soc Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Renaud Chaput Signed-off-by: Claire --- .../flavours/glitch/reducers/accounts.ts | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/app/javascript/flavours/glitch/reducers/accounts.ts b/app/javascript/flavours/glitch/reducers/accounts.ts index 345bff06ce..c9d7b5fe12 100644 --- a/app/javascript/flavours/glitch/reducers/accounts.ts +++ b/app/javascript/flavours/glitch/reducers/accounts.ts @@ -59,25 +59,19 @@ export const accountsReducer: Reducer = ( return normalizeAccounts(state, action.payload.accounts); else if (followAccountSuccess.match(action)) { return state - .update( - action.payload.relationship.id, - (account) => account?.update('followers_count', (n) => n + 1), + .update(action.payload.relationship.id, (account) => + account?.update('followers_count', (n) => n + 1), ) - .update( - getCurrentUser(), - (account) => account?.update('following_count', (n) => n + 1), + .update(getCurrentUser(), (account) => + account?.update('following_count', (n) => n + 1), ); } else if (unfollowAccountSuccess.match(action)) return state - .update( - action.payload.relationship.id, - (account) => - account?.update('followers_count', (n) => Math.max(0, n - 1)), + .update(action.payload.relationship.id, (account) => + account?.update('followers_count', (n) => Math.max(0, n - 1)), ) - .update( - getCurrentUser(), - (account) => - account?.update('following_count', (n) => Math.max(0, n - 1)), + .update(getCurrentUser(), (account) => + account?.update('following_count', (n) => Math.max(0, n - 1)), ); else return state; };