decord/source/actions/ChangeLogActionCreators.tsx

144 lines
4.4 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8345
// Function ID: 8346
2026-07-20 16:05:17 +00:00
// Name: cacheBustParam
2026-08-25 06:04:03 +00:00
// Dependencies: [5, 4394, 676, 1980, 709, 4070, 530, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 8345 (cacheBustParam)
2026-08-24 06:08:38 +00:00
import sendRequest from "sendRequest" /* 530 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-08-25 06:04:03 +00:00
import explicitContentFromProto from "explicitContentFromProto" /* 4070 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
2026-08-25 06:04:03 +00:00
import closure_4 from "handleUserSettingsProtoStoreChange" /* 4394 */;
2026-08-24 06:08:38 +00:00
import { Endpoints } from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import { ChangelogPlatforms } from "CHANGELOG_MODAL_KEY" /* 1980 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function cacheBustParam() {
return "x=" + Math.floor(new Date().getMinutes() / 5);
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("actions/ChangeLogActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
lockChangeLog(key) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_LOCK", key };
obj.dispatch(obj);
},
unlockChangeLog(key) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_UNLOCK", key };
obj.dispatch(obj);
},
2026-08-24 06:08:38 +00:00
markChangelogAsSeen(closure_2, date) {
let obj = dispatcherDefault;
obj = { type: "CHANGE_LOG_MARK_SEEN", changelogId: closure_2, changelogDate: date };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
2026-08-24 06:08:38 +00:00
const LastReceivedChangelogId = explicitContentFromProto.LastReceivedChangelogId;
LastReceivedChangelogId.updateSetting(closure_2);
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
setChangelogOverride(id) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-29 08:29:29 +00:00
obj = { type: "CHANGE_LOG_SET_OVERRIDE", id };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
2026-07-29 08:29:29 +00:00
if (null != id) {
const self = this;
this.sendChangelogMessage(id);
2026-07-20 16:05:17 +00:00
}
},
sendChangelogMessage(changelog_id) {
2026-08-24 06:08:38 +00:00
const HTTP = sendRequest.HTTP;
2026-07-23 10:11:24 +00:00
obj = { url: Endpoints.CHANGELOG_MESSAGES, body: obj, rejectWithError: true };
2026-07-20 16:05:17 +00:00
obj = { changelog_id };
HTTP.post(obj);
},
fetchChangelogConfig() {
2026-08-24 06:08:38 +00:00
const HTTP = sendRequest.HTTP;
const obj = { url: "https://cdn.discordapp.com/changelogs/config_" + ChangelogPlatforms.MOBILE + ".json?" + "x=" + Math.floor(new Date().getMinutes() / 5), rejectWithError: true };
2026-07-29 08:29:29 +00:00
return HTTP.get(obj);
2026-07-20 16:05:17 +00:00
},
2026-07-23 10:11:24 +00:00
fetchChangelog(closure_0, closure_1, arg2) {
2026-07-20 16:05:17 +00:00
let flag = arg2;
if (arg2 === undefined) {
flag = false;
}
2026-07-29 08:29:29 +00:00
let flag2 = arg3;
if (arg3 === undefined) {
2026-07-20 16:05:17 +00:00
flag2 = false;
}
2026-07-23 10:11:24 +00:00
const self = this;
2026-07-29 08:29:29 +00:00
return flag2(function*() {
2026-08-24 06:08:38 +00:00
closure_1 = tmp3;
if (null != c4.getChangelog(closure_1_0, closure_1_1)) {
2026-08-04 21:03:28 +00:00
return null;
}
if (dependencyMap) {
let MOBILE = tmp48.DESKTOP;
} else {
MOBILE = tmp48.MOBILE;
}
let str = "";
if (!c3) {
const _HermesInternal = HermesInternal;
2026-08-24 06:08:38 +00:00
str = "?" + closure_1_7();
2026-08-04 21:03:28 +00:00
}
dependencyMap = 1;
2026-08-24 06:08:38 +00:00
const HTTP = closure_1_0(530).HTTP;
obj1 = { url: null, rejectWithError: true };
2026-08-04 21:03:28 +00:00
const _HermesInternal2 = HermesInternal;
2026-08-24 06:08:38 +00:00
obj1[0] = "https://cdn.discordapp.com/changelogs/" + MOBILE + "/" + closure_1_0 + "/" + closure_1_1 + ".json" + str;
2026-08-04 21:03:28 +00:00
yield HTTP.get(obj1);
if (1 === tmp7) {
dependencyMap = 0;
2026-08-24 06:08:38 +00:00
let obj5 = closure_1_1(709);
2026-08-04 21:03:28 +00:00
const obj3 = { type: "CHANGE_LOG_FETCH_FAILED", id: null, locale: null };
obj3[1] = closure_0;
obj3[2] = closure_1;
obj5.dispatch(obj3);
let tmp8 = null;
if ("en-US" !== closure_1) {
c3 = 3;
c4 = 1;
const obj4 = { value: null, done: false };
obj4[0] = c4.fetchChangelog(closure_0, "en-US");
return obj4;
}
} else if (2 === tmp7) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
2026-08-04 21:03:28 +00:00
c4 = 3;
2026-07-29 08:29:29 +00:00
throw arg1;
} else if (arg0 === 2) {
2026-08-04 21:03:28 +00:00
dependencyMap = 0;
c4 = 3;
obj5 = { value: null, done: true };
obj5[0] = arg1;
return obj5;
2026-07-29 08:29:29 +00:00
} else {
2026-08-04 21:03:28 +00:00
closure_0 = arg1;
2026-08-24 06:08:38 +00:00
obj1 = closure_1_1(709);
2026-08-04 21:03:28 +00:00
const obj6 = { type: "CHANGE_LOG_FETCH_SUCCESS", id: null, changelog: null };
obj6[1] = closure_0;
obj6[2] = closure_0.body;
obj1.dispatch(obj6);
dependencyMap = 0;
c4 = 3;
const obj7 = { value: null, done: true };
obj7[0] = closure_0.body;
return obj7;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
} else if (arg0 === 1) {
c4 = 3;
throw arg1;
2026-07-20 16:05:17 +00:00
} else {
2026-08-04 21:03:28 +00:00
tmp8 = arg1;
if (arg0 === 2) {
c4 = 3;
const obj = { value: null, done: true };
obj[0] = arg1;
return obj;
2026-07-20 16:05:17 +00:00
}
}
2026-08-04 21:03:28 +00:00
return tmp8;
2026-07-20 16:05:17 +00:00
})();
}
};