Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
60 lines
1.7 KiB
TypeScript
60 lines
1.7 KiB
TypeScript
// Module ID: 12036
|
|
// Function ID: 12037
|
|
// Name: useTypingUsersIds
|
|
// Dependencies: [4253, 12035, 1371, 504, 2]
|
|
// Exports: useTypingUserIds
|
|
|
|
// Module 12036 (useTypingUsersIds)
|
|
import RelationshipStore from "RelationshipStore" /* 4253 */;
|
|
import TypingStore from "TypingStore" /* 12035 */;
|
|
import UserStore from "UserStore" /* 1371 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/chat/useTypingUsersIds.tsx");
|
|
|
|
export const useTypingUserIds = function useTypingUserIds(id, arg1) {
|
|
_require = id;
|
|
let MAX_SAFE_INTEGER = arg1;
|
|
if (arg1 === undefined) {
|
|
const _Number = Number;
|
|
MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
}
|
|
let items = [UserStore, TypingStore, RelationshipStore];
|
|
const items1 = [id, MAX_SAFE_INTEGER];
|
|
return require("initialize").useStateFromStoresArray(items, () => {
|
|
const currentUser = UserStore.getCurrentUser();
|
|
if (currentUser != null) {
|
|
id = currentUser.id;
|
|
}
|
|
const typingUsers = TypingStore.getTypingUsers(closure_0);
|
|
const items = [];
|
|
for (const key10013 in typingUsers) {
|
|
if (items.length >= MAX_SAFE_INTEGER) {
|
|
break;
|
|
} else {
|
|
let user = UserStore.getUser(key10013);
|
|
if (null == user) {
|
|
continue;
|
|
} else {
|
|
if (user.id === id) {
|
|
continue;
|
|
} else {
|
|
if (RelationshipStore.isBlockedOrIgnored(user.id)) {
|
|
continue;
|
|
} else {
|
|
let arr = items.push(user.id);
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
return items;
|
|
}, items1);
|
|
};
|