decord/source/modules/soundpacks/SoundpackStore.tsx

49 lines
1.6 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 10041
// Function ID: 10042
2026-07-29 08:29:29 +00:00
// Name: Soundpacks
2026-08-15 05:55:55 +00:00
// Dependencies: [10042, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-15 05:55:55 +00:00
// Module 10041 (Soundpacks)
2026-07-23 10:11:24 +00:00
import { Soundpacks } from "Soundpacks";
2026-07-29 08:29:29 +00:00
import { PersistedStore } from "initialize";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let closure_1 = { soundpack: Soundpacks.CLASSIC, lastSoundpackExperimentId: null };
class SoundpackStore extends PersistedStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = SoundpackStore.prototype;
prototype["initialize"] = function initialize(arg0) {
if (null != arg0) {
let closure_1 = arg0;
const _Object = Object;
const values = Object.values(Soundpacks);
if (!values.includes(closure_1.soundpack)) {
closure_1.soundpack = tmp2.CLASSIC;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = Soundpacks;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getState"] = function getState() {
return closure_1;
};
prototype["getSoundpack"] = function getSoundpack() {
return closure_1.soundpack;
};
prototype["getLastSoundpackExperimentId"] = function getLastSoundpackExperimentId() {
return closure_1.lastSoundpackExperimentId;
};
SoundpackStore.displayName = "SoundpackStore";
SoundpackStore.persistKey = "SoundpackStore";
const soundpackStore = new SoundpackStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
SET_SOUNDPACK: function handleSetSoundpack(forExperimentId) {
let lastSoundpackExperimentId = forExperimentId.forExperimentId;
2026-07-29 08:29:29 +00:00
const obj = { soundpack: forExperimentId.soundpack, lastSoundpackExperimentId: null };
2026-07-20 16:05:17 +00:00
if (undefined === lastSoundpackExperimentId) {
lastSoundpackExperimentId = obj.lastSoundpackExperimentId;
}
2026-07-29 08:29:29 +00:00
obj[1] = lastSoundpackExperimentId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
});
const result = require("dispatcher").fileFinishedImporting("modules/soundpacks/SoundpackStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default soundpackStore;