From 1e7022ff6d04b5f341c13530105d9dcf08c88ca8 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 10 Jul 2017 14:51:31 -0400 Subject: Deleting the focused post now sends user to normal channel view (#6890) --- webapp/reducers/views/channel.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'webapp/reducers/views') diff --git a/webapp/reducers/views/channel.js b/webapp/reducers/views/channel.js index 0deb2389e..1da6c2e29 100644 --- a/webapp/reducers/views/channel.js +++ b/webapp/reducers/views/channel.js @@ -62,8 +62,20 @@ function loadingPosts(state = {}, action) { } } +function focusedPostId(state = '', action) { + switch (action.type) { + case ActionTypes.RECEIVED_FOCUSED_POST: + return action.data; + case ChannelTypes.SELECT_CHANNEL: + return ''; + default: + return state; + } +} + export default combineReducers({ postVisibility, lastChannelViewTime, - loadingPosts + loadingPosts, + focusedPostId }); -- cgit v1.2.3-1-g7c22