decord/source/stores/native/ShareStore.tsx

96 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 13547
// Function ID: 13548
2026-07-29 08:29:29 +00:00
// Name: handleTokenUpdated
2026-08-05 07:35:12 +00:00
// Dependencies: [1218, 1372, 1862, 1931, 4072, 1874, 676, 1351, 8818, 503, 698, 589, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 13547 (handleTokenUpdated)
2026-07-29 08:29:29 +00:00
import fetchFingerprint from "fetchFingerprint";
import ensureGuildLoaded from "ensureGuildLoaded";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import handleConnectionOpen from "handleConnectionOpen";
import closure_10 from "handleConnectionOpen";
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import { AppStates } from "ME";
2026-07-29 08:29:29 +00:00
import { Store } from "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function handleTokenUpdated(token) {
token = token.token;
return false;
}
2026-07-29 08:29:29 +00:00
class ShareStore extends Store {
}
ShareStore.prototype["initialize"] = function initialize() {
this.waitFor(fetchFingerprint, ensureGuildLoaded, createGuildRecordFromRust, handleConnectionOpen, closure_10, mergeGuildAvatar);
};
ShareStore.displayName = "ShareStore";
const shareStore = new ShareStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
CHANNEL_SELECT: function handleChannelSelect(arg0) {
2026-07-23 10:11:24 +00:00
let closure_3;
let closure_4;
2026-07-20 16:05:17 +00:00
({ guildId: closure_3, channelId: closure_4 } = arg0);
return false;
},
LOGOUT: function handleLogout() {
2026-08-05 07:35:12 +00:00
importDefault(8818).setSelectedChannel(null, null);
const obj = importDefault(8818);
const obj2 = importDefault(8818);
2026-07-29 08:29:29 +00:00
const result = obj2.setAuthenticationToken(null, importDefault(698).getSuperPropertiesBase64());
2026-07-23 10:11:24 +00:00
let c5 = null;
2026-07-20 16:05:17 +00:00
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) {
2026-07-23 10:11:24 +00:00
if (null != c4) {
guild = guild.getGuild(c3);
2026-07-20 16:05:17 +00:00
let json = null;
if (null != guild) {
const _JSON = JSON;
json = JSON.stringify(guild);
}
2026-07-23 10:11:24 +00:00
channel = channel.getChannel(channelId.getChannelId());
2026-07-20 16:05:17 +00:00
let json1 = null;
if (null != channel) {
let obj = {};
const merged = Object.assign(channel.toJS());
let recipients = channel.recipients;
2026-07-29 08:29:29 +00:00
if (recipients == null) {
2026-07-20 16:05:17 +00:00
recipients = [];
}
const mapped = recipients.map(getUser.getUser);
2026-07-29 08:29:29 +00:00
obj.recipients = mapped.filter(require(1351) /* isDiscordFrontendDevelopment */.isNotNullish);
2026-07-20 16:05:17 +00:00
json1 = JSON.stringify(obj);
}
2026-08-05 07:35:12 +00:00
importDefault(8818).setSelectedChannel(json1, json);
2026-07-23 10:11:24 +00:00
c3 = null;
c4 = null;
2026-08-05 07:35:12 +00:00
const obj3 = importDefault(8818);
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
if (null != c5) {
2026-07-29 08:29:29 +00:00
obj = { client_app_state: null };
obj[0] = state;
const result = require(503) /* encodeProperties */.extendSuperProperties(obj);
const obj4 = require(503) /* encodeProperties */;
2026-08-05 07:35:12 +00:00
const obj6 = importDefault(8818);
2026-07-29 08:29:29 +00:00
const result1 = obj6.setAuthenticationToken(c5, importDefault(698).getSuperPropertiesBase64());
2026-07-20 16:05:17 +00:00
if (state === AppStates.INACTIVE) {
2026-07-23 10:11:24 +00:00
c5 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj7 = importDefault(698);
2026-07-20 16:05:17 +00:00
}
return false;
}
});
2026-07-29 08:29:29 +00:00
let result = require("createGuildRecordFromRust").fileFinishedImporting("stores/native/ShareStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default shareStore;