73 lines
2.8 KiB
TypeScript
73 lines
2.8 KiB
TypeScript
// Module ID: 16347
|
|
// Function ID: 16348
|
|
// Name: updateSoundpack
|
|
// Dependencies: [1212, 9697, 9698, 5244, 16348, 16351, 16352, 16353, 9699, 2]
|
|
|
|
// Module 16347 (updateSoundpack)
|
|
import initialize from "initialize";
|
|
import Soundpacks from "Soundpacks";
|
|
import { Soundpacks } from "Soundpacks";
|
|
import "initialize";
|
|
|
|
let require = arg1;
|
|
class HolidayEventsManager extends tmp2 {
|
|
constructor() {
|
|
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
|
|
closure_0 = applyArgumentsResult;
|
|
map = new Map();
|
|
applyArgumentsResult.stores = map.set(initialize, () => applyArgumentsResult.handleExperimentUpdated());
|
|
applyArgumentsResult.actions = { NOTIFICATIONS_SET_DISABLED_SOUNDS: applyArgumentsResult.updateRingtone };
|
|
applyArgumentsResult.handleExperimentUpdated = function handleExperimentUpdated() {
|
|
if (!outer1_1(outer1_2[4]).isDesktopOnly) {
|
|
applyArgumentsResult.updateSoundpack();
|
|
applyArgumentsResult.updateRingtone();
|
|
}
|
|
};
|
|
return applyArgumentsResult;
|
|
}
|
|
}
|
|
const prototype = HolidayEventsManager.prototype;
|
|
prototype["updateSoundpack"] = function updateSoundpack() {
|
|
const soundpack = store.getSoundpack();
|
|
const lastSoundpackExperimentId = store.getLastSoundpackExperimentId();
|
|
const experiment = importDefault(16348).experiment;
|
|
if (experiment != null) {
|
|
const name = experiment.definition.name;
|
|
}
|
|
let isEligibleResult = importDefault(16351).isEligible();
|
|
if (isEligibleResult) {
|
|
if (isEligibleResult) {
|
|
isEligibleResult = null != tmp3(16348).soundpack;
|
|
}
|
|
if (isEligibleResult) {
|
|
isEligibleResult = name !== lastSoundpackExperimentId;
|
|
}
|
|
if (isEligibleResult) {
|
|
isEligibleResult = soundpack !== tmp3(16348).soundpack;
|
|
}
|
|
if (isEligibleResult) {
|
|
require(16352) /* setSoundpack */.setSoundpack(tmp3(16348).soundpack, name);
|
|
const obj3 = require(16352) /* setSoundpack */;
|
|
}
|
|
} else {
|
|
require(16352) /* setSoundpack */.setSoundpack(Soundpacks.CLASSIC, null);
|
|
const obj2 = require(16352) /* setSoundpack */;
|
|
}
|
|
};
|
|
prototype["updateRingtone"] = function updateRingtone() {
|
|
if (obj.isEligible()) {
|
|
const tmpResult = importDefault(9699);
|
|
if (null != tmpResultResult.call_ringing) {
|
|
require(16353) /* setIncomingRingtone */.setIncomingRingtone("call_ringing", `${tmp7.call_ringing}.mp3`);
|
|
const obj3 = require(16353) /* setIncomingRingtone */;
|
|
}
|
|
tmpResultResult = importDefault(9699)(store.getSoundpack());
|
|
} else {
|
|
require(16353) /* setIncomingRingtone */.setIncomingRingtone("call_ringing", "call_ringing.mp3");
|
|
const obj2 = require(16353) /* setIncomingRingtone */;
|
|
}
|
|
};
|
|
const holidayEventsManager = new HolidayEventsManager();
|
|
const result = require("Soundpacks").fileFinishedImporting("modules/holidays/HolidayEventsManager.tsx");
|
|
|
|
export default holidayEventsManager;
|