mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 23:41:37 +01:00
[Glitch] Do not change follow counters when already following
Port 029c99bd7b
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
28287eb3b2
commit
50a40d1b2f
1 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,10 @@ export const accountsReducer: Reducer<typeof initialState> = (
|
|||
return state.setIn([action.payload.id, 'hidden'], false);
|
||||
else if (importAccounts.match(action))
|
||||
return normalizeAccounts(state, action.payload.accounts);
|
||||
else if (followAccountSuccess.match(action)) {
|
||||
else if (
|
||||
followAccountSuccess.match(action) &&
|
||||
!action.payload.alreadyFollowing
|
||||
) {
|
||||
return state
|
||||
.update(action.payload.relationship.id, (account) =>
|
||||
account?.update('followers_count', (n) => n + 1),
|
||||
|
|
Loading…
Reference in a new issue