Files
mostlymatter/webapp/channels/src/selectors/preferences.ts
Daniel Espino García d13429aa92 Enable import order (#24091)
* Enable import order

* Add new order groups and add consistent-type-imports

* Remove types group, move react to top and fix issues

* Add store and reducers to the redux group and move imports from types folder to the end

* Fix tsc

* Remove react rule

* Fix test

* Fix eslint disable
2023-09-06 12:51:55 +02:00

18 строки
561 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {getBool as getBoolPreference} from 'mattermost-redux/selectors/entities/preferences';
import {Preferences} from 'utils/constants';
import type {GlobalState} from 'types/store';
export const arePreviewsCollapsed = (state: GlobalState) => {
return getBoolPreference(
state,
Preferences.CATEGORY_DISPLAY_SETTINGS,
Preferences.COLLAPSE_DISPLAY,
Preferences.COLLAPSE_DISPLAY_DEFAULT !== 'false',
);
};