34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
// Module ID: 10078
|
|
// Function ID: 10079
|
|
// Name: isInAppMessageSoundsEnabled
|
|
// Dependencies: [595, 700, 4009, 2]
|
|
// Exports: isInAppMessageSoundsEnabled, setInAppMessageSoundsEnabled, useInAppMessageSoundsEnabled
|
|
|
|
// Module 10078 (isInAppMessageSoundsEnabled)
|
|
import set from "set" /* 2 */;
|
|
import Storage2 from "Storage" /* 595 */;
|
|
import isIterable from "isIterable" /* 4009 */;
|
|
import identity from "identity" /* 700 */;
|
|
|
|
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);
|
|
};
|