decord/source/actions/ChangeLogActionCreators.tsx

88 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 7808
2026-07-27 11:26:19 +00:00
// Function ID: 61984
2026-07-20 16:05:17 +00:00
// Name: cacheBustParam
2026-07-25 08:10:48 +00:00
// Dependencies: [5, 4142, 653, 1906, 686, 3804, 507, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 7808 (cacheBustParam)
2026-07-23 10:11:24 +00:00
import explicitContentFromProto from "explicitContentFromProto";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { Endpoints } from "ME";
import { ChangelogPlatforms } from "CHANGELOG_MODAL_KEY";
const require = arg1;
2026-07-20 16:05:17 +00:00
function cacheBustParam() {
return "x=" + Math.floor(new Date().getMinutes() / 5);
}
2026-07-23 10:11:24 +00:00
const result = require("ME").fileFinishedImporting("actions/ChangeLogActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
lockChangeLog(key) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_LOCK", key };
obj.dispatch(obj);
},
unlockChangeLog(key) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_UNLOCK", key };
obj.dispatch(obj);
},
markChangelogAsSeen(id, date) {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_MARK_SEEN", changelogId: id, changelogDate: date };
obj.dispatch(obj);
2026-07-25 08:10:48 +00:00
const LastReceivedChangelogId = require(3804) /* explicitContentFromProto */.LastReceivedChangelogId;
2026-07-20 16:05:17 +00:00
LastReceivedChangelogId.updateSetting(id);
},
setChangelogOverride(first) {
const self = this;
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj = { type: "CHANGE_LOG_SET_OVERRIDE", id: first };
obj.dispatch(obj);
if (null != first) {
self.sendChangelogMessage(first);
}
},
sendChangelogMessage(changelog_id) {
2026-07-23 10:11:24 +00:00
const HTTP = require(507) /* _isNativeReflectConstruct */.HTTP;
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-07-23 10:11:24 +00:00
const HTTP = require(507) /* _isNativeReflectConstruct */.HTTP;
2026-07-20 16:05:17 +00:00
return HTTP.get({ url: "https://cdn.discordapp.com/changelogs/config_" + ChangelogPlatforms.MOBILE + ".json?" + cacheBustParam(), rejectWithError: true });
},
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;
let flag2 = arg3;
if (arg2 === undefined) {
flag = false;
}
if (flag2 === undefined) {
flag2 = false;
}
2026-07-23 10:11:24 +00:00
const self = this;
return flag2(async () => {
if (null != self.getChangelog(outer1_0, outer1_1)) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-23 10:11:24 +00:00
const tmp = outer1_2 ? outer2_6.DESKTOP : outer2_6.MOBILE;
2026-07-20 16:05:17 +00:00
let str = "";
2026-07-23 10:11:24 +00:00
if (!outer1_3) {
2026-07-20 16:05:17 +00:00
const _HermesInternal = HermesInternal;
2026-07-23 10:11:24 +00:00
str = "?" + outer2_7();
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const HTTP = callback(flag[6]).HTTP;
2026-07-20 16:05:17 +00:00
let obj = {};
const _HermesInternal2 = HermesInternal;
2026-07-23 10:11:24 +00:00
obj.url = "https://cdn.discordapp.com/changelogs/" + tmp + "/" + outer1_0 + "/" + outer1_1 + ".json" + str;
2026-07-20 16:05:17 +00:00
obj.rejectWithError = true;
const tmp14 = yield HTTP.get(obj);
2026-07-23 10:11:24 +00:00
obj = { type: "CHANGE_LOG_FETCH_SUCCESS", id: outer1_0, changelog: tmp14.body };
callback2(true[4]).dispatch(obj);
2026-07-20 16:05:17 +00:00
return tmp14.body;
}
})();
}
};