* 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
18 строки
561 B
TypeScript
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',
|
|
);
|
|
};
|