Disable chat effects when reduce motion preferred
Some users prefer reduced motion, so this disables chat effects when such a preference is set in the browser or OS.
This commit is contained in:
parent
d643f06ff0
commit
10e25f306f
2 changed files with 47 additions and 0 deletions
|
@ -37,6 +37,7 @@ import UIFeatureController from "./controllers/UIFeatureController";
|
|||
import { UIFeature } from "./UIFeature";
|
||||
import { OrderedMultiController } from "./controllers/OrderedMultiController";
|
||||
import {Layout} from "./Layout";
|
||||
import ReducedMotionController from './controllers/ReducedMotionController';
|
||||
|
||||
// These are just a bunch of helper arrays to avoid copy/pasting a bunch of times
|
||||
const LEVELS_ROOM_SETTINGS = [
|
||||
|
@ -652,6 +653,7 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
|||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
displayName: _td("Show chat effects (animations when receiving e.g. confetti)"),
|
||||
default: true,
|
||||
controller: new ReducedMotionController(),
|
||||
},
|
||||
"Widgets.pinned": { // deprecated
|
||||
supportedLevels: LEVELS_ROOM_OR_ACCOUNT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue