summaryrefslogtreecommitdiffstats
path: root/ui/src/components/navbar.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-09-05 17:55:57 -0700
committerDessalines <tyhou13@gmx.com>2019-09-05 17:55:57 -0700
commit299285abb83dbf52491b8833ac73f28c5b437bcd (patch)
treec39c9eb88be94f6f40bf11ffbb2f8804ec3ed58d /ui/src/components/navbar.tsx
parent565fc0abdb3857390fb61cfcfeffa6fa0378ed6f (diff)
Fixing inbox refresh issue.
- Fixes #265
Diffstat (limited to 'ui/src/components/navbar.tsx')
-rw-r--r--ui/src/components/navbar.tsx8
1 files changed, 5 insertions, 3 deletions
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<any, NavbarState> {
keepFetchingReplies() {
this.fetchReplies();
- setInterval(() => this.fetchReplies(), 30000);
+ setInterval(() => this.fetchReplies(), 15000);
}
fetchReplies() {
@@ -193,8 +193,10 @@ export class Navbar extends Component<any, NavbarState> {
page: 1,
limit: 9999,
};
- WebSocketService.Instance.getReplies(repliesForm);
- this.state.fetchCount++;
+ if (this.currentLocation !=='/inbox') {
+ WebSocketService.Instance.getReplies(repliesForm);
+ this.state.fetchCount++;
+ }
}
}