From fd339717c7b93cae5aad8e7574e7454cd8f8fc29 Mon Sep 17 00:00:00 2001
From: Hazelnoot <acomputerdog@gmail.com>
Date: Sat, 10 May 2025 12:12:43 -0400
Subject: respect animation prefs in MkNumber

---
 packages/frontend/src/components/MkNumber.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkNumber.vue')

diff --git a/packages/frontend/src/components/MkNumber.vue b/packages/frontend/src/components/MkNumber.vue
index a278205b61..7c2393bf5c 100644
--- a/packages/frontend/src/components/MkNumber.vue
+++ b/packages/frontend/src/components/MkNumber.vue
@@ -10,6 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
 <script lang="ts" setup>
 import { reactive, watch } from 'vue';
 import number from '@/filters/number.js';
+import { prefer } from '@/preferences';
 
 const props = defineProps<{
 	value: number;
@@ -36,7 +37,11 @@ watch(() => props.value, (to, from) => {
 		}
 	}
 
-	window.requestAnimationFrame(step);
+	if (prefer.s.animation) {
+		window.requestAnimationFrame(step);
+	} else {
+		tweened.number = to;
+	}
 }, {
 	immediate: true,
 });
-- 
cgit v1.2.3-freya

