127 lines
6.8 KiB
TypeScript
127 lines
6.8 KiB
TypeScript
/* Metro module 15815; source: modules/relationships/RelationshipManager.tsx; dependencies: [7, 6, 15, 17, 18, 661, 4002, 1244, 15816, 4860, 2] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import AutomaticLifecycleManager from '../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as SharedModule from '../../design/shared.tsx'; /* Metro dependency 4002 */
|
|
import * as RelationshipUtilsModule from '../../utils/RelationshipUtils.tsx'; /* Metro dependency 15816 */
|
|
|
|
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});
|
|
let value = AutomaticLifecycleManager;
|
|
value = _fun121551(value);
|
|
value = new value();
|
|
(FileImportTrackerModule).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 = (SharedModule).AccessibilityAnnouncer;
|
|
const announce = AccessibilityAnnouncer.announce;
|
|
const intl = (IndexNativeModule).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const property = (IndexNativeModule).t['/+7xky'];
|
|
const username = user.username;
|
|
Reflect.apply(announce, AccessibilityAnnouncer, [Reflect.apply(formatToPlainString, intl, [property,
|
|
{username: username}])]);
|
|
(RelationshipUtilsModule).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 RelationshipManager2 = RelationshipManager;
|
|
Inherits(RelationshipManager2, a0);
|
|
return CreateClass(RelationshipManager2);
|
|
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 items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_6(RelationshipManager);
|
|
binding = env1_5;
|
|
if (_isNativeReflectConstruct_121546()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_6(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.actions = {RELATIONSHIP_ADD: handleRelationshipAdd_121549,
|
|
FRIEND_REQUEST_ACCEPTED: handleFriendRequestAccepted};
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun121545, 15815, [7, 6, 15, 17, 18, 661, 4002, 1244, 15816, 4860,
|
|
2]) /* metro module 15815, dependencies: [7, 6, 15, 17, 18, 661, 4002, 1244, 15816, 4860, 2] */;
|