decord/source/modules/notifications/native/InAppMessageSoundsStore.tsx

35 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 10033
// Function ID: 10034
2026-07-20 16:05:17 +00:00
// Name: isInAppMessageSoundsEnabled
2026-09-02 09:53:35 +00:00
// Dependencies: [592, 697, 4105, 2]
2026-07-20 16:05:17 +00:00
// Exports: isInAppMessageSoundsEnabled, setInAppMessageSoundsEnabled, useInAppMessageSoundsEnabled
// Module 10033 (isInAppMessageSoundsEnabled)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-09-02 09:53:35 +00:00
import Storage2 from "Storage" /* 592 */;
import isIterable from "isIterable" /* 4105 */;
import identity from "identity" /* 697 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const InAppMessageSoundsEnabled = "InAppMessageSoundsEnabled";
let closure_3 = identity.createWithEqualityFn(() => {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-07-29 08:29:29 +00:00
let isEnabled = Storage.get(InAppMessageSoundsEnabled);
if (isEnabled == null) {
isEnabled = true;
}
return { isEnabled };
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = set.fileFinishedImporting("modules/notifications/native/InAppMessageSoundsStore.tsx");
2026-07-20 16:05:17 +00:00
export const isInAppMessageSoundsEnabled = function isInAppMessageSoundsEnabled() {
return store.getState().isEnabled;
};
export const setInAppMessageSoundsEnabled = function setInAppMessageSoundsEnabled(isEnabled) {
2026-08-24 06:08:38 +00:00
const Storage = Storage2.Storage;
2026-07-29 08:29:29 +00:00
const result = Storage.set(InAppMessageSoundsEnabled, isEnabled);
2026-07-20 16:05:17 +00:00
store.setState({ isEnabled });
};
export const useInAppMessageSoundsEnabled = function useInAppMessageSoundsEnabled() {
2026-08-24 06:08:38 +00:00
return store((isEnabled) => isEnabled.isEnabled, isIterable.shallow);
2026-07-20 16:05:17 +00:00
};