28 lines
958 B
TypeScript
28 lines
958 B
TypeScript
// Metro module 11157 (f11158).
|
|
import RelationshipStore from "../../stores/RelationshipStore";
|
|
import TypingStore from "../../stores/TypingStore";
|
|
import UserStore from "../../stores/UserStore";
|
|
import { useStateFromStoresArray } from "../../_bundle/Module589";
|
|
export function useTypingUserIds(a0) {
|
|
let r6 = arguments[1];
|
|
if (r6 === void 0) {
|
|
r6 = Number.MAX_SAFE_INTEGER;
|
|
}
|
|
const MAX_SAFE_INTEGER = r6;
|
|
return useStateFromStoresArray([UserStore, TypingStore, RelationshipStore], () => {
|
|
const id = UserStore.getCurrentUser()?.id;
|
|
const typingUsers = TypingStore.getTypingUsers(a0);
|
|
const r19 = [];
|
|
for (const key in typingUsers) {
|
|
if (r19.length >= MAX_SAFE_INTEGER) {
|
|
break;
|
|
}
|
|
const user = UserStore.getUser(key);
|
|
if (user != null && user.id !== id && !RelationshipStore.isBlockedOrIgnored(user.id)) {
|
|
r19.push(user.id);
|
|
}
|
|
}
|
|
return r19;
|
|
}, [a0, MAX_SAFE_INTEGER]);
|
|
}
|