From 66ab1f83b0d342341181e0c88da83c966391fc0c Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 17 Dec 2019 15:38:19 +0100 Subject: Fix various issues caused by wrong `unread` key being updated --- app/javascript/flavours/glitch/reducers/timelines.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index d3318f8d3..1ea9ed645 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -71,7 +71,7 @@ const updateTimeline = (state, timeline, status, usePendingItems, filtered) => { state = state.update(timeline, initialTimeline, map => map.update('pendingItems', list => list.unshift(status.get('id')))); if (!filtered) { - state = state.update('unread', unread => unread + 1); + state = state.updateIn([timeline, 'unread'], unread => unread + 1); } return state; -- cgit