decord/beta/source/modules/friends/getFriendStatusCounts.tsx

36 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-10-02 13:37:24 +00:00
// Module ID: 16580
// Function ID: 16581
// Name: getFriendStatusCounts
2026-10-02 13:37:24 +00:00
// Dependencies: [4877, 4482, 1086, 2]
// Exports: default
2026-10-02 13:37:24 +00:00
// Module 16580 (getFriendStatusCounts)
import Constants from "Constants" /* 1086 */;
import PresenceStore from "PresenceStore" /* 4877 */;
import RelationshipStore from "RelationshipStore" /* 4482 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
const StatusTypes = Constants.StatusTypes;
const result = size.fileFinishedImporting("modules/friends/getFriendStatusCounts.tsx");
export default function getFriendStatusCounts() {
let num_friends_online = 0;
let num_friends_idle = 0;
let num_friends_dnd = 0;
const friendIDs = RelationshipStore.getFriendIDs();
2026-10-01 14:13:23 +00:00
const tmp2 = friendIDs[Symbol.iterator]();
while (tmp2 !== undefined) {
let status = PresenceStore.getStatus(tmp3);
let tmp6 = StatusTypes;
if (StatusTypes.ONLINE === status) {
num_friends_online = num_friends_online + 1;
} else if (tmp6.IDLE === status) {
num_friends_idle = num_friends_idle + 1;
} else if (tmp6.DND === status) {
num_friends_dnd = num_friends_dnd + 1;
}
continue;
}
return { num_friends_online, num_friends_idle, num_friends_dnd };
};