119 lines
5.7 KiB
TypeScript
119 lines
5.7 KiB
TypeScript
/* Metro module 15815; source: modules/relationships/RelationshipManager.tsx; dependencies: [7, 6, 15, 17, 18, 661, 4002, 1244, 15816, 4860, 2] */
|
|
function _fun121545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:6, offset: 0x0254a81c, size: 277 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_8 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
|
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
|
value = _fun121551(value);
|
|
value = new value();
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/relationships/RelationshipManager.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_121546() { // fn#121546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:176, offset: 0x0254a931, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_121546_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function handleRelationshipAdd_121549({relationship}) { // fn#121549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:369, offset: 0x0254a993, size: 192 bytes, params: 2, frame: 20
|
|
var AccessibilityAnnouncer;
|
|
var announce;
|
|
var intl;
|
|
var formatToPlainString;
|
|
var zH0kC7;
|
|
var user;
|
|
var showPendingNotification;
|
|
const userIgnored = relationship.userIgnored;
|
|
const type = relationship.type;
|
|
var value;
|
|
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
|
if (!(type !== PENDING_INCOMING || userIgnored)) {
|
|
AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
|
|
announce = AccessibilityAnnouncer.announce;
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
zH0kC7 = (require(1244) /* metro dependency 1244: indexNative */).t.zH0kC7;
|
|
user = relationship.user;
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(formatToPlainString, intl, [zH0kC7,
|
|
{username: user.username}])]);
|
|
value = importAll(15816) /* metro dependency 15816: RelationshipUtils */;
|
|
showPendingNotification = value.showPendingNotification;
|
|
user = relationship.user;
|
|
Reflect.apply(showPendingNotification, value, [user]);
|
|
}
|
|
}
|
|
|
|
function handleFriendRequestAccepted({user}) { // fn#121550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:631, offset: 0x0254aa53, size: 142 bytes, params: 2, frame: 20
|
|
const AccessibilityAnnouncer = (require(4002) /* metro dependency 4002: shared */).AccessibilityAnnouncer;
|
|
const announce = AccessibilityAnnouncer.announce;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const property = (require(1244) /* metro dependency 1244: indexNative */).t['/+7xky'];
|
|
const username = user.username;
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(formatToPlainString, intl, [property,
|
|
{username: username}])]);
|
|
(importAll(15816) /* metro dependency 15816: RelationshipUtils */).showAcceptedNotification(user);
|
|
}
|
|
|
|
function _fun121551(a0) { // fn#121551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:841, offset: 0x0254aae1, size: 42 bytes, params: 2, frame: 14
|
|
const closure = RelationshipManager;
|
|
env0_7(closure, a0);
|
|
return env0_3(closure);
|
|
}
|
|
|
|
function RelationshipManager(a0) { // fn#121552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16023:853, offset: 0x0254ab0b, size: 152 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, RelationshipManager);
|
|
const items = [];
|
|
arraySpread(items, value, 0, items);
|
|
value = env1_6(RelationshipManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_121546()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {RELATIONSHIP_ADD: handleRelationshipAdd_121549,
|
|
FRIEND_REQUEST_ACCEPTED: handleFriendRequestAccepted};
|
|
return value;
|
|
}
|
|
|