103 lines
5.3 KiB
TypeScript
103 lines
5.3 KiB
TypeScript
/* Metro module 9838; source: modules/reactions/native/MessageReactions.tsx; dependencies: [31, 4814, 33, 566, 6771, 6789, 9839, 2] */
|
|
function _fun77076(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:6, offset: 0x01deff6e, size: 166 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
|
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
|
const env0_6 = [];
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/reactions/native/MessageReactions.tsx');
|
|
exports.default = _default_77077;
|
|
}
|
|
|
|
function _default_77077(a0) { // fn#77077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:150, offset: 0x01df0014, size: 379 bytes, params: 2, frame: 26
|
|
var r4;
|
|
const channelId = a0.channelId;
|
|
const messageId = a0.messageId;
|
|
const emoji = a0.emoji;
|
|
const reactions = a0.reactions;
|
|
let isSelectedBurst = a0.isSelectedBurst;
|
|
isSelectedBurst = !(isSelectedBurst === undefined) && isSelectedBurst;
|
|
const object2 = {'channelId': 0, 'messageId': 0, 'emoji': 0, 'reactions': 0, 'isSelectedBurst': 0};
|
|
silentSetPrototypeOf(object2, null, undefined);
|
|
let value = copyDataProperties({}, a0, object2, undefined);
|
|
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
|
|
const MESSAGE_REACTIONS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).MESSAGE_REACTIONS;
|
|
const analyticsLocations = defaultImport(MESSAGE_REACTIONS).analyticsLocations;
|
|
const value3 = useMessageReactions(channelId, messageId);
|
|
const r14 = reactions == null ? value3 : reactions.length > 0 ? reactions : value3;
|
|
const items2 = [];
|
|
r14.forEach(_fun77082);
|
|
items2.sort(function(a0, a1) {
|
|
return (a1.burst_count > 0 ? a1.burst_count : a1.count) - (a0.burst_count > 0 ? a0.burst_count : a0.count);
|
|
});
|
|
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
|
|
if (items2.length > 0) {
|
|
const MessageReactionsContent = (require(9839) /* metro dependency 9839: MessageReactionsContent */).MessageReactionsContent;
|
|
value = <MessageReactionsContent channelId={channelId} messageId={messageId} emoji={emoji} reactions={items2} isSelectedBurst={isSelectedBurst} {...value} />;
|
|
r4 = value;
|
|
} else {
|
|
const MessageReactionsEmpty = (require(9839) /* metro dependency 9839: MessageReactionsContent */).MessageReactionsEmpty;
|
|
r4 = <MessageReactionsEmpty />;
|
|
}
|
|
return (
|
|
<AnalyticsLocationProvider value={analyticsLocations}>
|
|
{r4}
|
|
</AnalyticsLocationProvider>
|
|
);
|
|
}
|
|
|
|
function useMessageReactions(a0, a1) { // fn#77078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:288, owner: _default_77077.useMessageReactions, offset: 0x01df018f, size: 120 bytes, params: 3, frame: 18
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
return env1_3.useMemo(_fun77080, [(require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore],
|
|
_fun77079, [a0, a1])]);
|
|
}
|
|
|
|
function _fun77082(a0) { // fn#77082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:588, offset: 0x01df0275, size: 132 bytes, params: 2, frame: 16
|
|
var binding;
|
|
var push;
|
|
var object2;
|
|
if (a0.burst_count > 0) {
|
|
if (a0.count > 0) {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
object2['count'] = 0;
|
|
Reflect.apply(push, binding, [object2]);
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, 'count');
|
|
object2['burst_count'] = 0;
|
|
Reflect.apply(push, binding, [object2]);
|
|
} else {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
Reflect.apply(push, binding, [object2]);
|
|
}
|
|
} else {
|
|
binding = env0_0;
|
|
push = binding.push;
|
|
object2 = {};
|
|
copyDataProperties(object2, a0, undefined);
|
|
Reflect.apply(push, binding, [object2]);
|
|
}
|
|
}
|
|
|
|
function _fun77079() { // fn#77079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:360, offset: 0x01df0207, size: 50 bytes, params: 1, frame: 14
|
|
const message = MessageStore.getMessage(env0_0, require);
|
|
return message != null ? message.reactions : env2_6;
|
|
}
|
|
|
|
function _fun77080() { // fn#77080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10024:445, offset: 0x01df0239, size: 28 bytes, params: 1, frame: 11
|
|
return env0_2.filter(function({count_details}) {
|
|
return count_details?.vote == null;
|
|
});
|
|
}
|
|
|