34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
// Module ID: 10213
|
|
// Function ID: 10214
|
|
// Name: isInAppMessageSoundsEnabled
|
|
// Dependencies: [592, 697, 4105, 2]
|
|
// Exports: isInAppMessageSoundsEnabled, setInAppMessageSoundsEnabled, useInAppMessageSoundsEnabled
|
|
|
|
// Module 10213 (isInAppMessageSoundsEnabled)
|
|
import set from "set" /* 2 */;
|
|
import Storage2 from "Storage" /* 592 */;
|
|
import isIterable from "isIterable" /* 4105 */;
|
|
import identity from "identity" /* 697 */;
|
|
|
|
const InAppMessageSoundsEnabled = "InAppMessageSoundsEnabled";
|
|
let closure_3 = identity.createWithEqualityFn(() => {
|
|
const Storage = Storage2.Storage;
|
|
let isEnabled = Storage.get(InAppMessageSoundsEnabled);
|
|
if (isEnabled == null) {
|
|
isEnabled = true;
|
|
}
|
|
return { isEnabled };
|
|
});
|
|
let result = set.fileFinishedImporting("modules/notifications/native/InAppMessageSoundsStore.tsx");
|
|
|
|
export const isInAppMessageSoundsEnabled = function isInAppMessageSoundsEnabled() {
|
|
return store.getState().isEnabled;
|
|
};
|
|
export const setInAppMessageSoundsEnabled = function setInAppMessageSoundsEnabled(isEnabled) {
|
|
const Storage = Storage2.Storage;
|
|
const result = Storage.set(InAppMessageSoundsEnabled, isEnabled);
|
|
store.setState({ isEnabled });
|
|
};
|
|
export const useInAppMessageSoundsEnabled = function useInAppMessageSoundsEnabled() {
|
|
return store((isEnabled) => isEnabled.isEnabled, isIterable.shallow);
|
|
};
|