about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/actions/store.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-08-28 13:52:18 +0200
committerThibG <thib@sitedethib.com>2018-08-28 19:52:28 +0200
commit24b6811a6ed5c3449b6fd82dc30e5b988b76df99 (patch)
tree179f94e6176d413bc25c976ebe0b5bc4d187cb25 /app/javascript/flavours/glitch/actions/store.js
parente3246cd13b6ee034f5c8e969828332dc9312d449 (diff)
[Glitch] Implement tag auto-completion by history
Port 460e380d386367b6809d319859e13d17a6a2acea to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/actions/store.js')
-rw-r--r--app/javascript/flavours/glitch/actions/store.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/actions/store.js b/app/javascript/flavours/glitch/actions/store.js
index a1db0fdd5..2dd94a998 100644
--- a/app/javascript/flavours/glitch/actions/store.js
+++ b/app/javascript/flavours/glitch/actions/store.js
@@ -1,4 +1,5 @@
 import { Iterable, fromJS } from 'immutable';
+import { hydrateCompose } from './compose';
 
 export const STORE_HYDRATE = 'STORE_HYDRATE';
 export const STORE_HYDRATE_LAZY = 'STORE_HYDRATE_LAZY';
@@ -8,10 +9,14 @@ const convertState = rawState =>
     Iterable.isIndexed(v) ? v.toList() : v.toMap());
 
 export function hydrateStore(rawState) {
-  const state = convertState(rawState);
+  return dispatch => {
+    const state = convertState(rawState);
 
-  return {
-    type: STORE_HYDRATE,
-    state,
+    dispatch({
+      type: STORE_HYDRATE,
+      state,
+    });
+
+    dispatch(hydrateCompose());
   };
 };