Files
discord-decomp/sources/modules/game_profile/hooks/useGameAnnouncements.tsx
T
2026-07-27 16:20:00 +03:00

41 lines
2.5 KiB
TypeScript

/* Metro module 10016; source: modules/game_profile/hooks/useGameAnnouncements.tsx; dependencies: [31, 9965, 566, 10017, 2] */
function _fun78229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:6, offset: 0x01e21ecf, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useEffect;
const gameProfileStore = importDefault(9965) /* metro dependency 9965: GameProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/game_profile/hooks/useGameAnnouncements.tsx');
exports.default = useGameAnnouncements;
}
function useGameAnnouncements(a0) { // fn#78230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:221, offset: 0x01e21f56, size: 190 bytes, params: 2, frame: 17
const env0_0 = a0;
const value2 = undefined;
const {data, hasFetched,
isFetching} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameProfileStore],
_fun78231);
useEffect(_fun78232, [a0, hasFetched]);
return {messages: (data == null ? value2 : data.messages) ?? [], channelId: data == null ? value2 : data.channelId,
guildId: data == null ? value2 : data.guildId, loading: isFetching};
}
function _fun78231() { // fn#78231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:300, offset: 0x01e22014, size: 128 bytes, params: 1, frame: 15
const object2 = {};
object2.data = env0_0 != null ? GameProfileStore.getAnnouncements(env0_0) : undefined;
object2.hasFetched = env0_0 != null && GameProfileStore.hasAnnouncementsBeenFetched(env0_0);
object2.isFetching = env0_0 != null && GameProfileStore.isAnnouncementsFetching(env0_0);
return object2;
}
function _fun78232() { // fn#78232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10202:503, offset: 0x01e22094, size: 92 bytes, params: 1, frame: 13
var value4;
let r1 = env0_0 == null || hasFetched;
r1 = !r1 ? GameProfileStore.isAnnouncementsFetching(env0_0) : r1;
if (!r1) {
value4 = environment.__proto__;
(require(10017) /* metro dependency 10017: GameProfileHttpUtils */).getGameAnnouncements(env0_0);
}
}