decord/source/modules/welcome_screen/WelcomeScreenActionCreators.tsx

139 lines
4.6 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 11897
// Function ID: 11898
2026-07-20 16:05:17 +00:00
// Name: _fetchWelcomeScreen
2026-07-29 08:29:29 +00:00
// Dependencies: [5, 676, 709, 530, 2]
2026-07-20 16:05:17 +00:00
// Exports: clearWelcomeScreenSettings, fetchWelcomeScreen, resetWelcomeScreen, saveWelcomeScreen, updateSettings, welcomeScreenViewed
2026-08-05 07:35:12 +00:00
// Module 11897 (_fetchWelcomeScreen)
2026-07-23 10:11:24 +00:00
import asyncGeneratorStep from "asyncGeneratorStep";
import { Endpoints } from "ME";
const require = arg1;
2026-07-20 16:05:17 +00:00
function _fetchWelcomeScreen() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0) => {
let closure_0 = arg0;
let c5 = 0;
let c6 = 0;
let c4 = 0;
return (function*(arg0) {
2026-08-04 21:03:28 +00:00
const dependencyMap = tmp3;
outer1_1(outer1_2[2]).dispatch({ type: "WELCOME_SCREEN_FETCH_START" });
let c4 = 1;
const HTTP = callback(outer1_2[3]).HTTP;
const obj1 = { url: null, oldFormErrors: true, rejectWithError: true };
obj1[0] = c4.GUILD_WELCOME_SCREEN(callback);
yield HTTP.get(obj1);
c4 = 0;
let obj4 = lib(709);
obj4.dispatch({ type: "WELCOME_SCREEN_FETCH_FAIL" });
2026-08-05 07:35:12 +00:00
lib = yield "T";
2026-08-04 21:03:28 +00:00
const obj = lib(709);
obj4 = { type: "WELCOME_SCREEN_FETCH_SUCCESS", guildId: null, welcomeScreen: null };
obj4[1] = callback;
obj4[2] = lib.body;
obj.dispatch(obj4);
c4 = 0;
return lib.body;
2026-07-29 08:29:29 +00:00
})();
});
const _fetchWelcomeScreen = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
function _saveWelcomeScreen() {
2026-07-29 08:29:29 +00:00
const self = this;
const tmp = callback((arg0, arg1) => {
let closure_0 = arg0;
let closure_1 = arg1;
let c6 = 0;
let c7 = 0;
let c5 = 0;
return (function*(arg0, arg1) {
2026-08-04 21:03:28 +00:00
let asyncGeneratorStep = tmp3;
lib(outer1_2[2]).dispatch({ type: "WELCOME_SCREEN_SUBMIT" });
let c5 = 1;
const HTTP = callback(outer1_2[3]).HTTP;
const obj1 = { url: null, body: null, oldFormErrors: true, rejectWithError: true };
obj1[0] = outer1_4.GUILD_WELCOME_SCREEN(callback);
({ description: obj10[0], channels: obj10[1], enabled: obj10[2] } = lib);
obj1[1] = { description: null, welcome_channels: null, enabled: null };
yield HTTP.patch(obj1);
if (1 === tmp7) {
c5 = 0;
const obj3 = lib(709);
obj3.dispatch({ type: "WELCOME_SCREEN_SUBMIT_FAILURE" });
let c7 = 3;
} else if (arg0 === 1) {
2026-07-29 08:29:29 +00:00
c7 = 3;
2026-08-04 21:03:28 +00:00
throw arg1;
} else if (arg0 !== 2) {
lib = arg1;
const obj = lib(709);
const obj4 = { type: "WELCOME_SCREEN_SUBMIT_SUCCESS", guildId: null, welcomeScreen: null };
obj4[1] = callback;
obj4[2] = lib.body;
obj.dispatch(obj4);
c5 = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
c5 = 0;
return arg1;
2026-07-29 08:29:29 +00:00
})();
});
const _saveWelcomeScreen = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const result = require("dispatcher").fileFinishedImporting("modules/welcome_screen/WelcomeScreenActionCreators.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const welcomeScreenViewed = function welcomeScreenViewed(closure_0) {
2026-07-20 16:05:17 +00:00
let flag = arg1;
if (arg1 === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
obj = { type: "WELCOME_SCREEN_VIEW", guildId: closure_0, isLurking: flag };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
2026-07-29 08:29:29 +00:00
export const fetchWelcomeScreen = function fetchWelcomeScreen(closure_0) {
const self = this;
const apply = _fetchWelcomeScreen.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
export const resetWelcomeScreen = function resetWelcomeScreen() {
2026-07-29 08:29:29 +00:00
importDefault(709).dispatch({ type: "WELCOME_SCREEN_SETTINGS_RESET" });
2026-07-20 16:05:17 +00:00
};
export const clearWelcomeScreenSettings = function clearWelcomeScreenSettings() {
2026-07-29 08:29:29 +00:00
importDefault(709).dispatch({ type: "WELCOME_SCREEN_SETTINGS_CLEAR" });
2026-07-20 16:05:17 +00:00
};
export const updateSettings = function updateSettings(settings) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "WELCOME_SCREEN_SETTINGS_UPDATE", settings };
obj.dispatch(obj);
};
export const saveWelcomeScreen = function saveWelcomeScreen() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _saveWelcomeScreen.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};