diff --git a/package.json b/package.json index d22fc9724..1ef66b1cd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.118.1-calc.10.1", + "version": "12.118.1-calc.10.2", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/ui/universal.vue b/packages/client/src/ui/universal.vue index aa4498ac6..e095f7c20 100644 --- a/packages/client/src/ui/universal.vue +++ b/packages/client/src/ui/universal.vue @@ -134,15 +134,14 @@ onMounted(() => { if (!isDesktop.value) { window.addEventListener('resize', () => { if (window.innerWidth >= DESKTOP_THRESHOLD) isDesktop.value = true; - let scrollPos = 0; + }, { passive: true }); - function checkPosition() { - let windowY = window.scrollY; - postButton.style.transform = `scale(${windowY < scrollPos ? '1' : '0'})`; - scrollPos = windowY; - } + let scrollPos = 0; - window.addEventListener('scroll', checkPosition); + window.addEventListener('scroll', () => { + let windowY = window.scrollY; + postButton.style.transform = `scale(${windowY < scrollPos ? '1' : '0'})`; + scrollPos = windowY; }, { passive: true }); } }); @@ -183,7 +182,6 @@ function top() { const wallpaper = localStorage.getItem('wallpaper') != null; -