about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/timelines.js
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-05-29 16:14:16 +0200
committerThibaut Girka <thib@sitedethib.com>2020-05-29 20:02:30 +0200
commit9bd30b8dd563d1c7066060ccfa456ea350a7fb01 (patch)
tree5dde72cb0d891a2c470cc5ad6323b017ebc76b03 /app/javascript/flavours/glitch/actions/timelines.js
parent60b43050cb01075248958c7d71586e6a2a312c04 (diff)
[Glitch] Fix timeline markers not working on Chrome
Port 5aff2a6957e861162d67c4610277e9bb2a6f8186 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/actions/timelines.js')
-rw-r--r--app/javascript/flavours/glitch/actions/timelines.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/actions/timelines.js b/app/javascript/flavours/glitch/actions/timelines.js
index 46b605e04..9a7f62a08 100644
--- a/app/javascript/flavours/glitch/actions/timelines.js
+++ b/app/javascript/flavours/glitch/actions/timelines.js
@@ -1,4 +1,5 @@
 import { importFetchedStatus, importFetchedStatuses } from './importer';
+import { submitMarkers } from './markers';
 import api, { getLinks } from 'flavours/glitch/util/api';
 import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
 import compareId from 'flavours/glitch/util/compare_id';
@@ -49,6 +50,10 @@ export function updateTimeline(timeline, status, accept) {
       usePendingItems: preferPendingItems,
       filtered
     });
+
+    if (timeline === 'home') {
+      dispatch(submitMarkers());
+    }
   };
 };
 
@@ -112,6 +117,10 @@ export function expandTimeline(timelineId, path, params = {}, done = noOp) {
 
       dispatch(importFetchedStatuses(response.data));
       dispatch(expandTimelineSuccess(timelineId, response.data, next ? next.uri : null, response.status === 206, isLoadingRecent, isLoadingMore, isLoadingRecent && preferPendingItems));
+
+      if (timelineId === 'home') {
+        dispatch(submitMarkers());
+      }
     }).catch(error => {
       dispatch(expandTimelineFail(timelineId, error, isLoadingMore));
     }).finally(() => {