unfollow tag on delete

This commit is contained in:
Sean Yesmunt 2019-06-10 14:38:53 -04:00
parent 478251f900
commit 12f4c032b8
2 changed files with 5 additions and 1 deletions

4
dist/bundle.es.js vendored
View file

@ -3815,9 +3815,11 @@ const tagsReducer = handleActions({
let newKnownTags = _extends$b({}, knownTags);
delete newKnownTags[name];
const newFollowedTags = followedTags.filter(tag => tag !== name);
return _extends$b({}, state, {
knownTags: newKnownTags
knownTags: newKnownTags,
followedTags: newFollowedTags
});
},
[FETCH_TRENDING_STARTED]: state => _extends$b({}, state, {

View file

@ -59,10 +59,12 @@ export const tagsReducer = handleActions(
let newKnownTags = { ...knownTags };
delete newKnownTags[name];
const newFollowedTags = followedTags.filter(tag => tag !== name);
return {
...state,
knownTags: newKnownTags,
followedTags: newFollowedTags,
};
},
[ACTIONS.FETCH_TRENDING_STARTED]: (state: TagState) => ({