|
|
@ -11,14 +11,12 @@ const getHasDeviceOutdatedSyncing = (state: StateType) =>
|
|
|
|
const getHasBlindedMsgRequestsEnabled = (state: StateType) =>
|
|
|
|
const getHasBlindedMsgRequestsEnabled = (state: StateType) =>
|
|
|
|
state.settings.settingsBools[SettingsKey.hasBlindedMsgRequestsEnabled];
|
|
|
|
state.settings.settingsBools[SettingsKey.hasBlindedMsgRequestsEnabled];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getHasFollowSystemThemeEnabled = (state: StateType) =>
|
|
|
|
const getHasFollowSystemThemeEnabled = (state: StateType) =>
|
|
|
|
state.settings.settingsBools[SettingsKey.hasFollowSystemThemeEnabled];
|
|
|
|
state.settings.settingsBools[SettingsKey.hasFollowSystemThemeEnabled];
|
|
|
|
|
|
|
|
|
|
|
|
const getHasShiftSendEnabled = (state: StateType) =>
|
|
|
|
const getHasShiftSendEnabled = (state: StateType) =>
|
|
|
|
state.settings.settingsBools[SettingsKey.hasShiftSendEnabled];
|
|
|
|
state.settings.settingsBools[SettingsKey.hasShiftSendEnabled];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useHasLinkPreviewEnabled = () => {
|
|
|
|
export const useHasLinkPreviewEnabled = () => {
|
|
|
|
const value = useSelector(getLinkPreviewEnabled);
|
|
|
|
const value = useSelector(getLinkPreviewEnabled);
|
|
|
|
return Boolean(value);
|
|
|
|
return Boolean(value);
|
|
|
@ -34,9 +32,10 @@ export const useHasBlindedMsgRequestsEnabled = () => {
|
|
|
|
return Boolean(value);
|
|
|
|
return Boolean(value);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useHasFollowSystemThemeEnabled = () => {
|
|
|
|
export const useHasFollowSystemThemeEnabled = () => {
|
|
|
|
const value = useSelector(getHasFollowSystemThemeEnabled);
|
|
|
|
const value = useSelector(getHasFollowSystemThemeEnabled);
|
|
|
|
|
|
|
|
return Boolean(value);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export const useHasEnterSendEnabled = () => {
|
|
|
|
export const useHasEnterSendEnabled = () => {
|
|
|
|
const value = useSelector(getHasShiftSendEnabled);
|
|
|
|
const value = useSelector(getHasShiftSendEnabled);
|
|
|
|