decord/source/stores/native/ShareStore.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

99 lines
3.5 KiB
TypeScript

// Module ID: 14398
// Function ID: 14399
// Name: handleTokenUpdated
// Dependencies: [502, 1957, 1979, 2011, 4381, 1371, 1074, 1369, 8362, 1250, 1242, 504, 573, 2]
// Module 14398 (handleTokenUpdated)
import initializeDefault from "initialize" /* 504 */;
import dispatcherDefault from "dispatcher" /* 573 */;
import expandEventPropertiesDefault from "expandEventProperties" /* 1242 */;
import encodeProperties from "encodeProperties" /* 1250 */;
import isDiscordFrontendDevelopment from "isDiscordFrontendDevelopment" /* 1369 */;
import enforcingDefault from "enforcing" /* 8362 */;
import closure_6 from "fetchFingerprint" /* 502 */;
import closure_7 from "ensureGuildLoaded" /* 1957 */;
import closure_8 from "createGuildRecordFromRust" /* 1979 */;
import closure_9 from "handleConnectionOpen" /* 2011 */;
import closure_10 from "handleConnectionOpen" /* 4381 */;
import closure_11 from "mergeGuildAvatar" /* 1371 */;
import { AppStates } from "ME" /* 1074 */;
require = arg1;
function handleTokenUpdated(token) {
token = token.token;
return false;
}
const Store = initializeDefault.Store;
class ShareStore extends Store {
}
ShareStore.prototype["initialize"] = function initialize() {
this.waitFor(closure_6, closure_7, closure_8, closure_9, closure_10, closure_11);
};
ShareStore.displayName = "ShareStore";
const shareStore = new ShareStore(dispatcherDefault, {
CHANNEL_SELECT: function handleChannelSelect(arg0) {
({ guildId: closure_3, channelId: closure_4 } = arg0);
return false;
},
LOGOUT: function handleLogout() {
enforcingDefault.setSelectedChannel(null, null);
const obj = enforcingDefault;
const obj2 = enforcingDefault;
const result = obj2.setAuthenticationToken(null, expandEventPropertiesDefault.getSuperPropertiesBase64());
c5 = null;
return false;
},
REGISTER_SUCCESS: handleTokenUpdated,
LOGIN_SUCCESS: handleTokenUpdated,
UPDATE_TOKEN: handleTokenUpdated,
START_SESSION: function handleStartSession() {
const token2 = token.getToken();
return false;
},
APP_STATE_UPDATE: function handleAppStateUpdate(state) {
state = state.state;
if (state === AppStates.INACTIVE) {
if (null != c4) {
guild = guild.getGuild(c3);
let json = null;
if (null != guild) {
const _JSON = JSON;
json = JSON.stringify(guild);
}
channel = channel.getChannel(channelId.getChannelId());
let json1 = null;
if (null != channel) {
let obj = {};
const merged = Object.assign(channel.toJS());
let recipients = channel.recipients;
if (recipients == null) {
recipients = [];
}
const mapped = recipients.map(getUser.getUser);
obj.recipients = mapped.filter(isDiscordFrontendDevelopment.isNotNullish);
json1 = JSON.stringify(obj);
}
enforcingDefault.setSelectedChannel(json1, json);
c3 = null;
c4 = null;
const obj3 = enforcingDefault;
}
}
if (null != c5) {
obj = { client_app_state: null };
obj[0] = state;
const result = encodeProperties.extendSuperProperties(obj);
const obj4 = encodeProperties;
const obj6 = enforcingDefault;
const result1 = obj6.setAuthenticationToken(c5, expandEventPropertiesDefault.getSuperPropertiesBase64());
if (state === AppStates.INACTIVE) {
c5 = null;
}
const obj7 = expandEventPropertiesDefault;
}
return false;
}
});
let result = require("set").fileFinishedImporting("stores/native/ShareStore.tsx");
export default shareStore;