From 54ce930b8d97cff9443ee28a3165c90e67689187 Mon Sep 17 00:00:00 2001
From: Andrew Dolgov <noreply@fakecake.org>
Date: Sun, 16 Dec 2018 12:41:27 +0300
Subject: [PATCH] delay counters request on promise completion a bit

---
 js/AppBase.js   | 3 +--
 js/Headlines.js | 4 +++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/js/AppBase.js b/js/AppBase.js
index c7e221094..bb2c3cbcc 100644
--- a/js/AppBase.js
+++ b/js/AppBase.js
@@ -209,8 +209,7 @@ define(["dojo/_base/declare"], function (declare) {
 					const seq = reply['seq'];
 
 					if (seq && this.get_seq() != seq) {
-						console.log("[handleRpcJson] sequence mismatch: " + seq +
-							" (want: " + this.get_seq() + ")");
+						console.log("[handleRpcJson] sequence mismatch: ", seq, '!=', this.get_seq());
 						return true;
 					}
 
diff --git a/js/Headlines.js b/js/Headlines.js
index bbf48738b..19ab69d16 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -141,7 +141,9 @@ define(["dojo/_base/declare"], function (declare) {
 
 			if (promises.length > 0)
 				Promise.all([promises]).then(() => {
-					Feeds.requestCounters(true);
+					setTimeout(() => {
+						Feeds.requestCounters(true);
+					}, 1000);
 				});
 
 		},
-- 
GitLab