decord/alpha/source/modules/reactions/native/MessageReactions.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

80 lines
3 KiB
TypeScript

// Module ID: 11034
// Function ID: 11035
// Name: MessageReactions
// Dependencies: [19, 5065, 21, 504, 6769, 6789, 11035, 2]
// Exports: default
// Module 11034 (MessageReactions)
import useAnalyticsLocationsDefault from "useAnalyticsLocations" /* 6769 */;
import AnalyticsLocationDefault from "AnalyticsLocation" /* 6789 */;
import noop from "module_19" /* 19 */;
import MessageStore from "MessageStore" /* 5065 */;
const require = fn;
const jsx = fn(21).jsx;
let closure_6 = [];
const size = fn(2);
const result = size.fileFinishedImporting("modules/reactions/native/MessageReactions.tsx");
export default function MessageReactions(emoji) {
({ channelId, messageId, reactions, isSelectedBurst } = emoji);
if (isSelectedBurst === undefined) {
isSelectedBurst = false;
}
let merged = Object.assign(emoji, Object.assign({ channelId: 0, messageId: 0, emoji: 0, reactions: 0, isSelectedBurst: 0 }));
let items3;
closure_129_0 = channelId;
closure_129_1 = messageId;
const tmp3 = useAnalyticsLocationsDefault;
const items = [MessageStore];
const items1 = [channelId, messageId];
const stateFromStores = items3(504).useStateFromStores(items, () => {
const message = MessageStore.getMessage(items3, importDefault);
return null != message ? message.reactions : closure_6;
}, items1);
closure_129_2 = stateFromStores;
const items2 = [stateFromStores];
const memo = noop.useMemo(() => dependencyMap.filter((count_details) => {
count_details = count_details.count_details;
let vote;
if (count_details != null) {
vote = count_details.vote;
}
return null == vote;
}), items2);
let arr4 = memo;
if (null != reactions) {
arr4 = memo;
if (reactions.length > 0) {
arr4 = reactions;
}
}
items3 = [];
const item = arr4.forEach((burst_count) => {
if (burst_count.burst_count > 0) {
if (burst_count.count > 0) {
const obj2 = {};
const merged = Object.assign(burst_count);
obj2.count = 0;
items3.push(obj2);
const obj3 = {};
const merged1 = Object.assign(burst_count);
obj3.burst_count = 0;
items3.push(obj3);
}
}
const merged2 = Object.assign(burst_count);
items3.push({});
});
const sorted = items3.sort((burst_count, burst_count2) => (burst_count2.burst_count > 0 ? burst_count2.burst_count : burst_count2.count) - (burst_count.burst_count > 0 ? burst_count.burst_count : burst_count.count));
let obj2 = { value: tmp3(AnalyticsLocationDefault.MESSAGE_REACTIONS).analyticsLocations, children: null };
if (items3.length > 0) {
let obj3 = { channelId, messageId, emoji: emoji.emoji, reactions: items3, isSelectedBurst };
let merged1 = Object.assign(merged);
let tmp9Result = tmp9(tmp4(11035).MessageReactionsContent, obj3);
} else {
tmp9Result = tmp9(tmp4(11035).MessageReactionsEmpty, {});
}
obj2.children = tmp9Result;
return jsx(items3(6769).AnalyticsLocationProvider, { value: tmp3(AnalyticsLocationDefault.MESSAGE_REACTIONS).analyticsLocations, children: null });
};