1
0
forked from mirror/misskey

refactor: avoid temporary previous tapping declarations

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-04-09 04:40:47 +00:00 committed by GitHub
parent ce8967e8d9
commit e649b1b1e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -149,13 +149,7 @@ let sOneRound = false;
function tick() {
const now = props.now();
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + props.offset);
const previousS = s;
const previousM = m;
const previousH = h;
s = now.getSeconds();
m = now.getMinutes();
h = now.getHours();
if (previousS === s && previousM === m && previousH === h) {
if (s === (s = now.getSeconds()) && m === (m = now.getMinutes()) && h === (h = now.getHours())) {
return;
}
hAngle = Math.PI * (h % (props.twentyfour ? 24 : 12) + (m + s / 60) / 60) / (props.twentyfour ? 12 : 6);