From 2384f761b1efe9e9fa40f5b767691a09db0aee67 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 25 Mar 2018 17:36:02 +0200 Subject: [PATCH] Now fetch activity from API on first timeline display (#141) --- front/src/App.vue | 26 ---------------- front/src/store/instance.js | 3 ++ front/src/views/instance/Timeline.vue | 43 ++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/front/src/App.vue b/front/src/App.vue index bff52e97e..e8ab18694 100644 --- a/front/src/App.vue +++ b/front/src/App.vue @@ -36,9 +36,6 @@ diff --git a/front/src/store/instance.js b/front/src/store/instance.js index 2436eab07..245acaf03 100644 --- a/front/src/store/instance.js +++ b/front/src/store/instance.js @@ -43,6 +43,9 @@ export default { if (state.events.length > state.maxEvents) { state.events = state.events.slice(0, state.maxEvents) } + }, + events: (state, value) => { + state.events = value } }, actions: { diff --git a/front/src/views/instance/Timeline.vue b/front/src/views/instance/Timeline.vue index b959c25d6..8ffcd9758 100644 --- a/front/src/views/instance/Timeline.vue +++ b/front/src/views/instance/Timeline.vue @@ -1,7 +1,10 @@