signal-desktop/ts/util/stories.ts
Scott Nonnenberg fe9d042e40
Introduce the new Settings tab
Co-authored-by: Jamie Kyle <jamie@signal.org>
Co-authored-by: Fedor Indutny <indutny@signal.org>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
2025-05-14 20:58:20 -07:00

14 lines
579 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export const getStoriesDisabled = (): boolean =>
window.storage.get('hasStoriesDisabled', false);
export const setStoriesDisabled = async (value: boolean): Promise<void> => {
await window.storage.put('hasStoriesDisabled', value);
const account = window.ConversationController.getOurConversationOrThrow();
account.captureChange('hasStoriesDisabled');
window.textsecure.server?.onHasStoriesDisabledChange(value);
};
export const getStoriesBlocked = (): boolean => getStoriesDisabled();