diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-09-17 11:27:20 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-09-17 15:22:56 +0200 |
commit | a681980307441be386fdd36fd0846edb76c5ed53 (patch) | |
tree | 59fca1962c8abbd628645401e8a85ac12ef8bf74 /app/javascript/flavours/glitch/features/ui | |
parent | 60eebc6cc4d62479b23c2148c76172c0b3458629 (diff) |
Submit timeline markers closer to the moment they change
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js index bf76c0e57..a8fc1ad84 100644 --- a/app/javascript/flavours/glitch/features/ui/index.js +++ b/app/javascript/flavours/glitch/features/ui/index.js @@ -12,7 +12,7 @@ import { expandHomeTimeline } from 'flavours/glitch/actions/timelines'; import { expandNotifications, notificationsSetVisibility } from 'flavours/glitch/actions/notifications'; import { fetchFilters } from 'flavours/glitch/actions/filters'; import { clearHeight } from 'flavours/glitch/actions/height_cache'; -import { synchronouslySubmitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers'; +import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers'; import { WrappedSwitch, WrappedRoute } from 'flavours/glitch/util/react_router_helpers'; import UploadArea from './components/upload_area'; import PermaLink from 'flavours/glitch/components/permalink'; @@ -358,6 +358,9 @@ class UI extends React.Component { handleVisibilityChange = () => { const visibility = !document[this.visibilityHiddenProp]; this.props.dispatch(notificationsSetVisibility(visibility)); + if (visibility) { + this.props.dispatch(submitMarkers()); + } } componentWillMount () { |