File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 2727
2828<script lang="ts">
2929import { Vue , Component } from ' vue-property-decorator'
30+ import { setAuthHeader } from ' ~/plugins/axios'
3031
3132@Component
3233export default class DefaultLayout extends Vue {
@@ -38,6 +39,14 @@ export default class DefaultLayout extends Vue {
3839
3940 mounted() {
4041 this .startPoller ()
42+ setTimeout (
43+ () => {
44+ if (this .poller ) {
45+ clearInterval (this .poller )
46+ }
47+ },
48+ 60 * 1000 * 60 ,
49+ )
4150 }
4251
4352 beforeDestroy(): void {
@@ -52,9 +61,10 @@ export default class DefaultLayout extends Vue {
5261
5362 const promises = []
5463 if (this .$store .getters .getAuthUser && this .$store .getters .getOwner ) {
64+ setAuthHeader ((await this .$fire .auth .currentUser ?.getIdToken ()) ?? ' ' )
5565 promises .push (
5666 this .$store .dispatch (' loadThreads' ),
57- this .$store .dispatch (' getHeartbeat' )
67+ this .$store .dispatch (' getHeartbeat' ),
5868 )
5969 }
6070
@@ -66,8 +76,8 @@ export default class DefaultLayout extends Vue {
6676 promises .push (
6777 this .$store .dispatch (
6878 ' loadThreadMessages' ,
69- this .$store .getters .getThread .id
70- )
79+ this .$store .getters .getThread .id ,
80+ ),
7181 )
7282 }
7383 await Promise .all (promises )
You can’t perform that action at this time.
0 commit comments