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

63 lines
2.6 KiB
TypeScript

/* Metro module 11531; source: modules/chat/useTypingUsersIds.tsx; dependencies: [3793, 11532, 1878, 566, 2] */
function _fun88317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11717:6, offset: 0x01fdf3ce, size: 146 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const typingStore = importDefault(11532) /* metro dependency 11532: TypingStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat/useTypingUsersIds.tsx');
exports.useTypingUserIds = useTypingUserIds;
}
function useTypingUserIds(a0) { // fn#88318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11717:213, offset: 0x01fdf460, size: 121 bytes, params: 2, frame: 18
const value = a1;
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore, TypingStore,
RelationshipStore], _fun88319, [a0, value !== undefined ? value : global.Number.MAX_SAFE_INTEGER]);
}
function _fun88319() { // fn#88319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11717:316, offset: 0x01fdf4d9, size: 164 bytes, params: 1, frame: 22
var r3;
var propertyName;
var propertyName2;
var length;
var user;
var id2;
var isBlockedOrIgnored;
var id3;
var push;
var id4;
const id = UserStore.getCurrentUser()?.id;
const typingUsers = TypingStore.getTypingUsers(env0_0);
const items2 = [];
for (propertyName in typingUsers) {
length = items2.length;
if (length >= env0_1) {
break;
}
user = UserStore.getUser(propertyName);
if (user == null) {
r3 = propertyName2;
continue;
}
id2 = user.id;
if (id2 === id) {
r3 = propertyName2;
continue;
}
isBlockedOrIgnored = RelationshipStore.isBlockedOrIgnored;
id3 = user.id;
if (Reflect.apply(isBlockedOrIgnored, RelationshipStore, [id3])) {
r3 = propertyName2;
continue;
}
push = items2.push;
id4 = user.id;
Reflect.apply(push, items2, [id4]);
r3 = propertyName2;
}
return items2;
}