From 2edf11a36ac211f2644a2232b07e6034864a57d7 Mon Sep 17 00:00:00 2001 From: Nazar Kanaev Date: Tue, 6 Apr 2021 11:35:26 +0100 Subject: [PATCH] hopefully gone --- doc/todo.txt | 1 - src/assets/javascripts/app.js | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/doc/todo.txt b/doc/todo.txt index ca78f58..ef7682d 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -1,4 +1,3 @@ -- fix: mysterious "cannot read title of undefined" js error - fix: use only 1 item content field - etc: test new parser extensively - fix: loading items (by scrolling down) is glitching while feeds are refreshing diff --git a/src/assets/javascripts/app.js b/src/assets/javascripts/app.js index 4a44e44..a77b652 100644 --- a/src/assets/javascripts/app.js +++ b/src/assets/javascripts/app.js @@ -177,12 +177,10 @@ Vue.component('relative-time', { }) var vm = new Vue({ - mounted: function() { - this.refreshItems() - }, created: function() { - this.refreshFeeds() this.refreshStats() + .then(this.refreshFeeds.bind(this)) + .then(this.refreshItems.bind(this)) }, data: function() { var s = app.settings @@ -343,7 +341,7 @@ var vm = new Vue({ }, methods: { refreshStats: function(loopMode) { - api.status().then(function(data) { + return api.status().then(function(data) { if (loopMode && !vm.itemSelected) vm.refreshItems() vm.loading.feeds = data.running