From 12f4c032b8c6d8d08da87a7e64412855e7b5ae40 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Mon, 10 Jun 2019 14:38:53 -0400 Subject: [PATCH] unfollow tag on delete --- dist/bundle.es.js | 4 +++- src/redux/reducers/tags.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 903f824..64ae791 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -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, { diff --git a/src/redux/reducers/tags.js b/src/redux/reducers/tags.js index eb11692..38c3d09 100644 --- a/src/redux/reducers/tags.js +++ b/src/redux/reducers/tags.js @@ -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) => ({