]> Untitled Git - lemmy.git/commitdiff
Fixing inbox refresh issue.
authorDessalines <tyhou13@gmx.com>
Fri, 6 Sep 2019 00:55:57 +0000 (17:55 -0700)
committerDessalines <tyhou13@gmx.com>
Fri, 6 Sep 2019 00:55:57 +0000 (17:55 -0700)
- Fixes #265

ui/src/components/navbar.tsx

index 593301683b60954586aada1dac53c2e891dad045..c33f8196d22b42cadd090f0b56022d4bf47e5ba6 100644 (file)
@@ -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++;
+      }
     }
   }