From 01aae33a5f6e69942da0a3028dded2621f1d4c81 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 7 Jun 2019 17:05:32 +0200 Subject: [Glitch] Fix refreshing featured toots when the new collection is empty Port d34a3a2cc72c12ae5119150a8ac18dd8fb7a4e6b to glitch-soc --- app/javascript/flavours/glitch/reducers/timelines.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/reducers') diff --git a/app/javascript/flavours/glitch/reducers/timelines.js b/app/javascript/flavours/glitch/reducers/timelines.js index cb233de1c..440b370e6 100644 --- a/app/javascript/flavours/glitch/reducers/timelines.js +++ b/app/javascript/flavours/glitch/reducers/timelines.js @@ -35,7 +35,9 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is if (!next && !isLoadingRecent) mMap.set('hasMore', false); - if (!statuses.isEmpty()) { + if (timeline.endsWith(':pinned')) { + mMap.set('items', statuses.map(status => status.get('id'))); + } else if (!statuses.isEmpty()) { mMap.update('items', ImmutableList(), oldIds => { const newIds = statuses.map(status => status.get('id')); const lastIndex = oldIds.findLastIndex(id => id !== null && compareId(id, newIds.last()) >= 0) + 1; -- cgit From 417989ae34594df3d6ce720dfe70132158b6da28 Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 6 Jun 2019 13:04:34 +0200 Subject: [Glitch] Fix “mark as sensitive” not being used in delete & redraft MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 2657765d2a6804f34ce65bfdab7ec96f07d99732 to glitch-soc --- app/javascript/flavours/glitch/reducers/compose.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/javascript/flavours/glitch/reducers') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 51a341c42..36dfb8f15 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -442,6 +442,7 @@ export default function compose(state = initialState, action) { map.set('focusDate', new Date()); map.set('caretPosition', null); map.set('idempotencyKey', uuid()); + map.set('sensitive', action.status.get('sensitive')); if (action.status.get('spoiler_text').length > 0) { map.set('spoiler', true); -- cgit