Issue Title Show Focus Check On Load
This commit is contained in:
parent
33a25e0fc6
commit
44c52fa3cd
|
@ -34,17 +34,6 @@ export default {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
fetch() {
|
||||
this.poll.makeRequest();
|
||||
|
||||
Visibility.change(() => {
|
||||
if (!Visibility.hidden()) {
|
||||
this.poll.restart();
|
||||
} else {
|
||||
this.poll.stop();
|
||||
}
|
||||
});
|
||||
},
|
||||
renderResponse(res) {
|
||||
const body = JSON.parse(res.body);
|
||||
this.triggerAnimation(body);
|
||||
|
@ -71,7 +60,17 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
this.fetch();
|
||||
if (!Visibility.hidden()) {
|
||||
this.poll.makeRequest();
|
||||
}
|
||||
|
||||
Visibility.change(() => {
|
||||
if (!Visibility.hidden()) {
|
||||
this.poll.restart();
|
||||
} else {
|
||||
this.poll.stop();
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue