decord/alpha/source/modules/poggermode/PoggermodeActionCreators.tsx

74 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 13547
// Function ID: 13548
// Name: PoggermodeActionCreators
2026-10-09 10:00:15 +00:00
// Dependencies: [502, 7359, 13548, 584, 13550, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearMessageCombo, updateCombo, updateComboOnMessageSend, updatePoggermodeSettings
2026-10-09 10:00:15 +00:00
// Module 13547 (PoggermodeActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-09 10:00:15 +00:00
import trackPoggermodeSettingsUpdatedDefault from "trackPoggermodeSettingsUpdated" /* 13550 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-09 10:00:15 +00:00
import PoggermodeSettingsStore from "PoggermodeSettingsStore" /* 7359 */;
import PoggermodeStore from "PoggermodeStore" /* 13548 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const result = size.fileFinishedImporting("modules/poggermode/PoggermodeActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const updatePoggermodeSettings = function updatePoggermodeSettings(settings) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "POGGERMODE_SETTINGS_UPDATE", settings };
obj.dispatch(obj2);
const obj3 = {};
const merged = Object.assign(PoggermodeSettingsStore.getState());
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(settings);
2026-10-03 08:58:59 +00:00
trackPoggermodeSettingsUpdatedDefault(obj3);
2026-07-20 16:05:17 +00:00
};
export const updateCombo = function updateCombo(arg0) {
2026-10-03 08:58:59 +00:00
const dispatch = DispatcherDefault.dispatch;
const obj = { type: "POGGERMODE_UPDATE_COMBO" };
DispatcherDefault;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(arg0);
2026-10-03 08:58:59 +00:00
dispatch(obj);
2026-07-20 16:05:17 +00:00
};
export const clearMessageCombo = function clearMessageCombo(arg0) {
2026-10-03 08:58:59 +00:00
let obj2;
const obj = { type: "POGGERMODE_UPDATE_MESSAGE_COMBO", comboMessage: obj2 };
obj2 = { displayed: true };
const dispatch = DispatcherDefault.dispatch;
DispatcherDefault;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(arg0);
2026-10-03 08:58:59 +00:00
dispatch(obj);
2026-07-20 16:05:17 +00:00
};
export const updateComboOnMessageSend = function updateComboOnMessageSend(channelId, id) {
2026-10-03 08:58:59 +00:00
let obj3;
id = AuthenticationStore.getId();
const iter = PoggermodeStore.getUserCombo(id, channelId);
2026-07-20 16:05:17 +00:00
if (null != iter) {
2026-10-03 08:58:59 +00:00
const obj2 = { type: "POGGERMODE_UPDATE_MESSAGE_COMBO", comboMessage: obj3 };
obj3 = { combo: iter, channelId, messageId: id, displayed: false };
const obj = DispatcherDefault;
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let num = 1;
2026-07-20 16:05:17 +00:00
if (null != iter) {
2026-10-03 08:58:59 +00:00
let value;
2026-07-29 08:29:29 +00:00
if (iter != null) {
2026-07-20 16:05:17 +00:00
value = iter.value;
}
2026-07-29 08:29:29 +00:00
num = 1;
2026-07-20 16:05:17 +00:00
if (value > 0) {
2026-07-29 08:29:29 +00:00
let num3;
if (iter != null) {
num3 = iter.multiplier;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num3 == null) {
num3 = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
num = num3 + 1;
2026-07-20 16:05:17 +00:00
}
}
2026-10-03 08:58:59 +00:00
const obj4 = DispatcherDefault;
const obj5 = { type: "POGGERMODE_UPDATE_COMBO", channelId, userId: id, multiplier: num, value: 0 };
obj4.dispatch(obj5);
2026-07-20 16:05:17 +00:00
};