Browse Source

[Glitch] Fix bell button causing a brief “Cancel follow request” on locked accounts

Port 82951920f7 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
closed-social-glitch-2
ThibG 4 years ago
committed by Thibaut Girka
parent
commit
c3d82027cf
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/reducers/relationships.js

+ 1
- 1
app/javascript/flavours/glitch/reducers/relationships.js View File

@ -45,7 +45,7 @@ const initialState = ImmutableMap();
export default function relationships(state = initialState, action) {
switch(action.type) {
case ACCOUNT_FOLLOW_REQUEST:
return state.setIn([action.id, action.locked ? 'requested' : 'following'], true);
return state.getIn([action.id, 'following']) ? state : state.setIn([action.id, action.locked ? 'requested' : 'following'], true);
case ACCOUNT_FOLLOW_FAIL:
return state.setIn([action.id, action.locked ? 'requested' : 'following'], false);
case ACCOUNT_UNFOLLOW_REQUEST:

Loading…
Cancel
Save