summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-10 08:03:02 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-10 08:03:02 +0900
commitb29ff0e94b3480f8e57425c4a98d1d44d9d41572 (patch)
treecbffb0bbf968c2d5662f4d10cd7d750efa3daadb /src
parent2.35.2 (diff)
downloadmisskey-b29ff0e94b3480f8e57425c4a98d1d44d9d41572.tar.gz
misskey-b29ff0e94b3480f8e57425c4a98d1d44d9d41572.tar.bz2
misskey-b29ff0e94b3480f8e57425c4a98d1d44d9d41572.zip
:v:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/time.vue9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/app/common/views/components/time.vue b/src/client/app/common/views/components/time.vue
index aebfb33897..700643ff05 100644
--- a/src/client/app/common/views/components/time.vue
+++ b/src/client/app/common/views/components/time.vue
@@ -58,18 +58,21 @@ export default Vue.extend({
},
created() {
if (this.mode == 'relative' || this.mode == 'detail') {
- this.tick();
- this.tickId = setInterval(this.tick, 10000);
+ this.tickId = window.requestAnimationFrame(this.tick);
}
},
destroyed() {
if (this.mode === 'relative' || this.mode === 'detail') {
- clearInterval(this.tickId);
+ window.clearTimeout(this.tickId);
}
},
methods: {
tick() {
this.now = new Date();
+
+ this.tickId = setTimeout(() => {
+ window.requestAnimationFrame(this.tick);
+ }, 10000);
}
}
});