From 11fe3436c2bbb09f960dc24c2cff0e5d67d8b5d4 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 5 Sep 2019 17:55:57 -0700 Subject: [PATCH] Fixing inbox refresh issue. - Fixes #265 --- ui/src/components/navbar.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 5933016..c33f819 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -182,7 +182,7 @@ export class Navbar extends Component { keepFetchingReplies() { this.fetchReplies(); - setInterval(() => this.fetchReplies(), 30000); + setInterval(() => this.fetchReplies(), 15000); } fetchReplies() { @@ -193,8 +193,10 @@ export class Navbar extends Component { page: 1, limit: 9999, }; - WebSocketService.Instance.getReplies(repliesForm); - this.state.fetchCount++; + if (this.currentLocation !=='/inbox') { + WebSocketService.Instance.getReplies(repliesForm); + this.state.fetchCount++; + } } }