File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
web/src/elements/timestamp Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ import { ifPresent } from "#elements/utils/attributes";
77import { html , nothing , PropertyValues } from "lit" ;
88import { customElement , property } from "lit/decorators.js" ;
99
10+ /**
11+ * @deprecated Remove after #18296 is merged.
12+ */
13+ const reducedMotionMediaQueryList = window . matchMedia ( "(prefers-reduced-motion: reduce)" ) ;
14+
1015@customElement ( "ak-timestamp" )
1116export class AKTimestamp extends AKElement {
1217 static UpdateInterval = 1000 * 60 ;
@@ -91,7 +96,7 @@ export class AKTimestamp extends AKElement {
9196 // allowing the elapsed time to at first update every second for the first minute,
9297 // then every minute afterwards.
9398
94- if ( startWithinInterval ) {
99+ if ( startWithinInterval && ! reducedMotionMediaQueryList . matches ) {
95100 this . #interval = self . setInterval ( ( ) => {
96101 if ( ! this . visible || document . visibilityState !== "visible" ) return ;
97102
You can’t perform that action at this time.
0 commit comments