decord/source/modules/poggermode/PoggermodeActionCreators.tsx

64 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 7932
// Function ID: 7933
// Name: PoggermodeActionCreators
// Dependencies: [502, 7780, 7933, 573, 7935, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearMessageCombo, updateCombo, updateComboOnMessageSend, updatePoggermodeSettings
// Module 7932 (PoggermodeActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import trackPoggermodeSettingsUpdatedDefault from "trackPoggermodeSettingsUpdated" /* 7935 */;
import AuthenticationStore from "AuthenticationStore" /* 502 */;
import PoggermodeSettingsStore from "PoggermodeSettingsStore" /* 7780 */;
import PoggermodeStore from "PoggermodeStore" /* 7933 */;
2026-07-23 10:11:24 +00:00
const size = fn(2);
const result = size.fileFinishedImporting("modules/poggermode/PoggermodeActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const updatePoggermodeSettings = function updatePoggermodeSettings(settings) {
DispatcherDefault.dispatch({ type: "POGGERMODE_SETTINGS_UPDATE", settings });
const merged = Object.assign(PoggermodeSettingsStore.getState());
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(settings);
trackPoggermodeSettingsUpdatedDefault({});
2026-07-20 16:05:17 +00:00
};
export const updateCombo = function updateCombo(arg0) {
const merged = Object.assign(arg0);
DispatcherDefault.dispatch({ type: "POGGERMODE_UPDATE_COMBO" });
2026-07-20 16:05:17 +00:00
};
export const clearMessageCombo = function clearMessageCombo(arg0) {
const obj2 = { type: "POGGERMODE_UPDATE_MESSAGE_COMBO", comboMessage: null };
const obj3 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(arg0);
obj3.displayed = true;
obj2.comboMessage = obj3;
DispatcherDefault.dispatch(obj2);
2026-07-20 16:05:17 +00:00
};
export const updateComboOnMessageSend = function updateComboOnMessageSend(channelId, id) {
id = AuthenticationStore.getId();
const iter = PoggermodeStore.getUserCombo(id, channelId);
2026-07-20 16:05:17 +00:00
if (null != iter) {
const obj2 = { type: "POGGERMODE_UPDATE_MESSAGE_COMBO", comboMessage: null };
const obj3 = { combo: iter, channelId, messageId: id, displayed: false };
obj2.comboMessage = obj3;
DispatcherDefault.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) {
value = undefined;
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
}
}
DispatcherDefault.dispatch({ type: "POGGERMODE_UPDATE_COMBO", channelId, userId: id, multiplier: num, value: 0 });
2026-07-20 16:05:17 +00:00
};