decord/source/modules/notifications/settings/NotifSettingsActionCreators.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

61 lines
2.3 KiB
TypeScript

// Module ID: 15994
// Function ID: 15995
// Name: NotifSettingsActionCreators
// Dependencies: [13737, 13738, 573, 2]
// Exports: updateNotifSettingRadioValue, updateNotifSettingToggleValue
// Module 15994 (NotifSettingsActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import notification_settings from "notification_settings" /* 13738 */;
import NotifSettingsProtoStore from "NotifSettingsProtoStore" /* 13737 */;
require = fn;
function updateNotifSettingValue(GAMING_DEFAULT, createNew) {
createNew = createNew.createNew;
const settings = NotifSettingsProtoStore.settings;
if (null != settings.values[GAMING_DEFAULT]) {
const DeclarativeNotifSetting2 = notification_settings.DeclarativeNotifSetting;
let cloneResult = DeclarativeNotifSetting2.clone(tmp);
} else {
cloneResult = undefined;
if (createNew != null) {
cloneResult = createNew();
}
if (cloneResult == null) {
const DeclarativeNotifSetting = notification_settings.DeclarativeNotifSetting;
cloneResult = DeclarativeNotifSetting.create();
}
}
if (createNew.update(cloneResult)) {
const DeclarativeSettings = notification_settings.DeclarativeSettings;
const cloneResult1 = DeclarativeSettings.clone(settings);
cloneResult1.values[GAMING_DEFAULT] = cloneResult;
const obj2 = { type: "DECLARATIVE_NOTIFICATION_SETTINGS_UPDATE", declarativeSettings: cloneResult1 };
DispatcherDefault.dispatch(obj2);
}
}
const size = fn(2);
const result = size.fileFinishedImporting("modules/notifications/settings/NotifSettingsActionCreators.tsx");
export const updateNotifSettingToggleValue = function updateNotifSettingToggleValue(GAMING_DEFAULT, toggle) {
updateNotifSettingValue(GAMING_DEFAULT, {
createNew() {
const DeclarativeNotifSetting = toggle(dependencyMap[1]).DeclarativeNotifSetting;
const obj = DeclarativeNotifSetting.create();
obj.toggle = true;
return obj;
},
update(toggle) {
toggle.toggle = toggle;
return toggle.toggle !== toggle;
}
});
};
export const updateNotifSettingRadioValue = function updateNotifSettingRadioValue(GAMING_DEFAULT, radio) {
updateNotifSettingValue(GAMING_DEFAULT, {
update(radio) {
radio.radio = radio;
return radio.radio !== radio;
}
});
};