Files
discord-decomp/sources/modules/welcome_screen/WelcomeScreenStore.tsx
T
2026-07-27 16:20:00 +03:00

115 lines
5.6 KiB
TypeScript

/* Metro module 11971; source: modules/welcome_screen/WelcomeScreenStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun91880(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:6, offset: 0x02075adf, size: 409 bytes, params: 8, frame: 21
const closure = INVITE_RESOLVE_SUCCESS_91884;
const closure2 = WELCOME_SCREEN_SUBMIT_SUCCESS;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_6 = {};
const env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun91886(Store);
value.displayName = 'WelcomeScreenStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {INVITE_RESOLVE_SUCCESS: closure,
INVITE_ACCEPT_SUCCESS: closure, WELCOME_SCREEN_SUBMIT_SUCCESS: closure2, WELCOME_SCREEN_UPDATE: closure2,
WELCOME_SCREEN_VIEW: WELCOME_SCREEN_VIEW, GUILD_STOP_LURKING: function() {
env0_8 = false;
}, GUILD_DELETE: GUILD_DELETE_91895, WELCOME_SCREEN_FETCH_START: function() {
env0_9 = true;
env0_10 = false;
}, WELCOME_SCREEN_FETCH_SUCCESS: WELCOME_SCREEN_FETCH_SUCCESS, WELCOME_SCREEN_FETCH_FAIL: function() {
env0_9 = false;
env0_10 = true;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/welcome_screen/WelcomeScreenStore.tsx');
exports.default = value;
exports.NO_WELCOME_SCREEN = {};
}
function _isNativeReflectConstruct_91881() { // fn#91881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:148, offset: 0x02075c78, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_91881_isNativeReflectConstruct = function() {
return !!result;
})();
}
function INVITE_ACCEPT_SUCCESS_91884({invite}) { // fn#91884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:375, offset: 0x02075cda, size: 64 bytes, params: 2, frame: 4
var r0;
const guild = invite.guild;
value = guild?.welcome_screen != null;
if (value) {
env0_6[guild.id] = guild.welcome_screen;
r0 = true;
} else {
r0 = value;
}
return r0;
}
function WELCOME_SCREEN_SUBMIT_SUCCESS({welcomeScreen, guildId}) { // fn#91885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:503, offset: 0x02075d1a, size: 39 bytes, params: 2, frame: 5
env0_6[guildId] = welcomeScreen ?? env0_5;
}
function _fun91886(a0) { // fn#91886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:598, offset: 0x02075d41, size: 172 bytes, params: 2, frame: 16
const closure = WelcomeScreenStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'get', value: value_91888}, {key: 'isFetching', value: value_91889}, {key: 'hasError',
value: value_91890}, {key: 'hasSeen', value: value_91891}, {key: 'isEmpty', value: value_91892}]);
}
function WELCOME_SCREEN_VIEW({guildId, isLurking}) { // fn#91893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:1498, offset: 0x02075e54, size: 38 bytes, params: 2, frame: 5
env0_7[guildId] = true;
if (isLurking) {
}
}
function GUILD_DELETE_91895({guild}) { // fn#91895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:1655, offset: 0x02075e7a, size: 30 bytes, params: 2, frame: 3
env0_7[guild.id] = false;
}
function WELCOME_SCREEN_FETCH_SUCCESS({welcomeScreen, guildId}) { // fn#91897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:1814, offset: 0x02075eab, size: 49 bytes, params: 2, frame: 5
env0_6[guildId] = welcomeScreen ?? env0_5;
}
function value_91891(a0) { // fn#91891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:1059, offset: 0x02075ded, size: 53 bytes, params: 2, frame: 4
const value = a1;
return a0 != null && ((value !== undefined ? value : false) ? env1_8 : env1_7[a0] || false);
}
function value_91892(a0) { // fn#91892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12157:1130, offset: 0x02075e22, size: 50 bytes, params: 2, frame: 3
if (a0 == null) {
return true;
}
const value = environment.__proto__;
const property = env1_6[a0];
return property == null || property.welcome_channels.length === 0;
}