From: Dessalines Date: Fri, 6 Sep 2019 00:55:57 +0000 (-0700) Subject: Fixing inbox refresh issue. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7Bthis.captchaPngSrc%28%29%7D?a=commitdiff_plain;h=299285abb83dbf52491b8833ac73f28c5b437bcd;p=lemmy.git Fixing inbox refresh issue. - Fixes #265 --- diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 59330168..c33f8196 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++; + } } }