mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-26 15:32:37 +00:00
Do not change follow counters when already following (#32622)
This commit is contained in:
parent
c246d75fa7
commit
171ff80b61
|
@ -57,7 +57,10 @@ export const accountsReducer: Reducer<typeof initialState> = (
|
||||||
return state.setIn([action.payload.id, 'hidden'], false);
|
return state.setIn([action.payload.id, 'hidden'], false);
|
||||||
else if (importAccounts.match(action))
|
else if (importAccounts.match(action))
|
||||||
return normalizeAccounts(state, action.payload.accounts);
|
return normalizeAccounts(state, action.payload.accounts);
|
||||||
else if (followAccountSuccess.match(action)) {
|
else if (
|
||||||
|
followAccountSuccess.match(action) &&
|
||||||
|
!action.payload.alreadyFollowing
|
||||||
|
) {
|
||||||
return state
|
return state
|
||||||
.update(action.payload.relationship.id, (account) =>
|
.update(action.payload.relationship.id, (account) =>
|
||||||
account?.update('followers_count', (n) => n + 1),
|
account?.update('followers_count', (n) => n + 1),
|
||||||
|
|
Loading…
Reference in a new issue