Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,12 @@
|
||||
/* Metro module 14789; source: modules/notification_center/Constants.tsx; dependencies: [2] */
|
||||
function _fun111709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14986:6, offset: 0x023ae426, size: 134 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/Constants.tsx');
|
||||
exports.PROFILE_BACKGROUND = '#83DDC5';
|
||||
exports.FRIEND_BACKGROUND = '#F47FFF';
|
||||
exports.MESSAGE_BACKGROUND = '#FFDE4D';
|
||||
exports.MENTION_BACKGROUND = '#DA373C';
|
||||
exports.REPLY_BACKGROUND = '#3498DB';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,755 @@
|
||||
/* Metro module 4623; source: modules/notification_center/NotificationCenterItemsStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 4117, 3794, 3793, 1878, 661, 4624, 4625, 4788, 21, 566, 694, 2] */
|
||||
function _fun39705(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6, offset: 0x010e85e3, size: 785 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _validate = function(a0) {
|
||||
return a0.id != null && a0.type != null;
|
||||
};
|
||||
const handleResetRemoteState = function() {
|
||||
handleReset({keepLocalItems: true});
|
||||
};
|
||||
const closure = NOTIFICATION_CENTER_ITEM_CREATE_39713;
|
||||
const isItem = function(a0, a1, a2) {
|
||||
var r0;
|
||||
var property;
|
||||
var value = a0.type === a1;
|
||||
if (value) {
|
||||
property = a0.other_user;
|
||||
value = undefined;
|
||||
value = (property == null ? value : property.id) === a2;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const closure2 = RELATIONSHIP_ADD_39719;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
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 experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
|
||||
const env0_9 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildEventEnded;
|
||||
const messageRecord = importDefault(3794) /* metro dependency 3794: MessageRecord */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).RelationshipTypes;
|
||||
object2 = {'loading': false, 'initialized': false, 'errored': false, 'isDataStale': false};
|
||||
object2.notifCenterItems = [];
|
||||
object2.staleNotifCenterItems = [];
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
object2.notifCenterIds = set;
|
||||
object2.notifCenterLocalItems = [];
|
||||
object2.paginationHasMore = true;
|
||||
object2.paginationCursor = undefined;
|
||||
object2.notifCenterActive = false;
|
||||
object2.notifCenterTabFocused = false;
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
set = _fun39724(PersistedStore);
|
||||
set.displayName = 'NotificationCenterItemsStore';
|
||||
set.persistKey = 'NotificationCenterItemsStore_v2';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_39739,
|
||||
LOGOUT: function() {
|
||||
handleReset();
|
||||
}, NOTIFICATION_CENTER_ITEMS_ACK: function({ids}) {
|
||||
updateItemsAck(ids, true);
|
||||
}, NOTIFICATION_CENTER_ITEMS_ACK_FAILURE: function({ids}) {
|
||||
updateItemsAck(ids, false);
|
||||
}, GUILD_SCHEDULED_EVENT_UPDATE: function({guildScheduledEvent}) {
|
||||
updateGuildEvent(guildScheduledEvent);
|
||||
}, NOTIFICATION_CENTER_ITEM_CREATE: closure, NOTIFICATION_CENTER_ITEM_DELETE: NOTIFICATION_CENTER_ITEM_DELETE,
|
||||
NOTIFICATION_CENTER_ITEM_DELETE_FAILURE: closure,
|
||||
LOAD_NOTIFICATION_CENTER_ITEMS: LOAD_NOTIFICATION_CENTER_ITEMS,
|
||||
LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE: LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE,
|
||||
LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS_39752,
|
||||
RESET_NOTIFICATION_CENTER: function() {
|
||||
handleResetRemoteState();
|
||||
}, NOTIFICATION_CENTER_SET_ACTIVE: NOTIFICATION_CENTER_SET_ACTIVE,
|
||||
NOTIFICATION_CENTER_TAB_FOCUSED: NOTIFICATION_CENTER_TAB_FOCUSED, RELATIONSHIP_ADD: closure2,
|
||||
RELATIONSHIP_UPDATE: closure2, RELATIONSHIP_REMOVE: RELATIONSHIP_REMOVE_39759,
|
||||
GAME_RELATIONSHIP_ADD: GAME_RELATIONSHIP_ADD, GAME_RELATIONSHIP_REMOVE: GAME_RELATIONSHIP_REMOVE,
|
||||
NOTIFICATION_CENTER_ITEM_COMPLETED: NOTIFICATION_CENTER_ITEM_COMPLETED, SET_RECENT_MENTIONS_FILTER: function() {
|
||||
handleResetRemoteState();
|
||||
}, MOBILE_NATIVE_UPDATE_CHECK_FINISHED: MOBILE_NATIVE_UPDATE_CHECK_FINISHED,
|
||||
APPLICATIONS_FETCH_SUCCESS: APPLICATIONS_FETCH_SUCCESS_39771});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterItemsStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_39706() { // fn#39706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:246, offset: 0x010e88f4, size: 94 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_39706_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleReset() { // fn#39710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:737, offset: 0x010e896e, size: 148 bytes, params: 1, frame: 13
|
||||
const value = a0;
|
||||
let keepLocalItems = (value !== undefined ? value : {}).keepLocalItems;
|
||||
keepLocalItems = !(keepLocalItems === undefined) && keepLocalItems;
|
||||
const object2 = {'loading': false, 'initialized': false, 'errored': false, 'isDataStale': false};
|
||||
object2.notifCenterItems = [];
|
||||
object2.staleNotifCenterItems = [];
|
||||
const Set = global.Set;
|
||||
object2.notifCenterIds = new Set();
|
||||
object2.notifCenterLocalItems = keepLocalItems ? env0_14.notifCenterLocalItems : [];
|
||||
object2.paginationHasMore = true;
|
||||
object2.paginationCursor = undefined;
|
||||
object2.notifCenterActive = false;
|
||||
object2.notifCenterTabFocused = false;
|
||||
}
|
||||
|
||||
function toNotificationCenterItem(a0) { // fn#39712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:1117, offset: 0x010e8a1b, size: 229 bytes, params: 2, frame: 17
|
||||
var r5;
|
||||
const item_enum = a0.item_enum;
|
||||
var value;
|
||||
const value2 = undefined;
|
||||
const ItemEnum = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum;
|
||||
const FIRST_MESSAGE = ItemEnum.FIRST_MESSAGE;
|
||||
if (item_enum === FIRST_MESSAGE && a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems.LIFECYCLE_ITEM) {
|
||||
a0.deeplink = 'https://discord.com/feature/composeMessage';
|
||||
}
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, 11);
|
||||
object2['kind'] = 'notification-center-item';
|
||||
if (a0.message != null) {
|
||||
value = require(4625) /* metro dependency 4625: MessageRecordUtils */;
|
||||
value = value.createMessageRecord(a0.message);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value2;
|
||||
}
|
||||
object2['message'] = r5;
|
||||
object2['applicationId'] = a0.application != null ? a0.application.id : value2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_ITEM_CREATE_39713(a0) { // fn#39713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:1492, offset: 0x010e8b00, size: 200 bytes, params: 2, frame: 16
|
||||
var notifCenterIds;
|
||||
var has;
|
||||
var id;
|
||||
var add;
|
||||
var binding;
|
||||
var items2;
|
||||
var notifCenterItems;
|
||||
const r4 = a0.type === 'NOTIFICATION_CENTER_ITEM_CREATE' ? toNotificationCenterItem(a0.item) : a0.item;
|
||||
if (env0_14.initialized) {
|
||||
if (_validate(r4)) {
|
||||
notifCenterIds = env0_14.notifCenterIds;
|
||||
has = notifCenterIds.has;
|
||||
id = r4.id;
|
||||
if (Reflect.apply(has, notifCenterIds, [id])) {
|
||||
return false;
|
||||
}
|
||||
notifCenterIds = env0_14.notifCenterIds;
|
||||
add = notifCenterIds.add;
|
||||
id = r4.id;
|
||||
Reflect.apply(add, notifCenterIds, [id]);
|
||||
binding = env0_14;
|
||||
items2 = [r4];
|
||||
notifCenterItems = env0_14.notifCenterItems;
|
||||
arraySpread(items2, notifCenterItems, 1, notifCenterIds);
|
||||
binding.notifCenterItems = items2;
|
||||
notifCenterItems = env0_14.notifCenterItems;
|
||||
notifCenterItems.sort(_fun39714);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateItemsAck(a0, a1) { // fn#39715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:1811, offset: 0x010e8bff, size: 68 bytes, params: 3, frame: 13
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const binding = env0_14;
|
||||
const value2 = binding.notifCenterItems.map(_fun39716);
|
||||
binding.notifCenterItems = value2.filter(_validate);
|
||||
}
|
||||
|
||||
function isGameRelationshipItem(a0, a1, a2, a3) { // fn#39718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:2029, offset: 0x010e8cb1, size: 42 bytes, params: 5, frame: 15
|
||||
return isItem(a0, a1, a2) && a0.applicationId === a3;
|
||||
}
|
||||
|
||||
function RELATIONSHIP_ADD_39719({relationship}) { // fn#39719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:2112, offset: 0x010e8cdb, size: 325 bytes, params: 2, frame: 25
|
||||
var r2;
|
||||
var value2;
|
||||
var binding;
|
||||
var notifCenterLocalItems;
|
||||
var items2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const id = relationship.id;
|
||||
const type = relationship.type;
|
||||
const isSpamRequest = relationship.isSpamRequest;
|
||||
const userIgnored = relationship.userIgnored;
|
||||
const user = relationship.user;
|
||||
const since = relationship.since;
|
||||
const originApplicationId = relationship.originApplicationId;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
if (type !== PENDING_INCOMING) {
|
||||
r2 = type !== RelationshipTypes.FRIEND || relationship.user == null;
|
||||
r2 = !r2 ? userIgnored : r2;
|
||||
if (!r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.map(_fun39720);
|
||||
}
|
||||
r2 = type === RelationshipTypes.BLOCKED || userIgnored;
|
||||
if (r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39721);
|
||||
}
|
||||
} else {
|
||||
if (isSpamRequest) {
|
||||
r2 = type !== RelationshipTypes.FRIEND || relationship.user == null;
|
||||
r2 = !r2 ? userIgnored : r2;
|
||||
if (!r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.map(_fun39720);
|
||||
}
|
||||
r2 = type === RelationshipTypes.BLOCKED || userIgnored;
|
||||
if (r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39721);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (userIgnored) {
|
||||
r2 = type !== RelationshipTypes.FRIEND || relationship.user == null;
|
||||
r2 = !r2 ? userIgnored : r2;
|
||||
if (!r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.map(_fun39720);
|
||||
}
|
||||
r2 = type === RelationshipTypes.BLOCKED || userIgnored;
|
||||
if (r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39721);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
if (since == null) {
|
||||
return null;
|
||||
}
|
||||
if (user != null) {
|
||||
value2 = UserStore.getUser(user.id);
|
||||
if (value2 != null) {
|
||||
binding = env0_14;
|
||||
notifCenterLocalItems = binding.notifCenterLocalItems;
|
||||
items2 = [];
|
||||
value3 = arraySpread(items2, notifCenterLocalItems, 0, undefined);
|
||||
moduleValue = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
items2[value3] = moduleValue.incomingFriendRequestLocalItem(value2, since, originApplicationId);
|
||||
value3 + 1;
|
||||
binding.notifCenterLocalItems = items2;
|
||||
}
|
||||
}
|
||||
r2 = type !== RelationshipTypes.FRIEND || relationship.user == null;
|
||||
r2 = !r2 ? userIgnored : r2;
|
||||
if (!r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.map(_fun39720);
|
||||
}
|
||||
r2 = type === RelationshipTypes.BLOCKED || userIgnored;
|
||||
if (r2) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39721);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateGuildEvent(a0) { // fn#39722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:3233, offset: 0x010e8fbb, size: 59 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
const env0_0 = a0;
|
||||
if (isGuildEventEnded(a0)) {
|
||||
binding = env0_14;
|
||||
binding.notifCenterItems = binding.notifCenterItems.map(_fun39723);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun39724(a0) { // fn#39724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:3458, offset: 0x010e9061, size: 298 bytes, params: 2, frame: 16
|
||||
const closure = NotificationCenterItemsStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: value_39726}, {key: 'getState', value: value_39728},
|
||||
{key: 'loading', get: get_39730}, {key: 'initialized', get: get_39731}, {key: 'items', get: get_39732},
|
||||
{key: 'hasMore', get: get_39733}, {key: 'cursor', get: get_39734}, {key: 'errored', get: get_39735},
|
||||
{key: 'active', get: get_39736}, {key: 'localItems', get: get_39737}, {key: 'tabFocused', get: get_39738}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_39739({relationships, gameRelationships, guilds}) { // fn#39739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4996, offset: 0x010e93f7, size: 125 bytes, params: 2, frame: 14
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
relationships.forEach(_fun39740);
|
||||
gameRelationships.forEach(_fun39741);
|
||||
guilds.forEach(function({guild_scheduled_events}) {
|
||||
guild_scheduled_events.forEach(_fun39743);
|
||||
});
|
||||
env0_14.notifCenterLocalItems = [];
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_ITEM_DELETE({id}) { // fn#39748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6043, offset: 0x010e9632, size: 99 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
const notifCenterIds = env0_14.notifCenterIds;
|
||||
if (notifCenterIds.has(id)) {
|
||||
env0_14.notifCenterIds.delete(id);
|
||||
binding = env0_14;
|
||||
binding.notifCenterItems = binding.notifCenterItems.filter(function({id}) {
|
||||
return id !== id;
|
||||
});
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function LOAD_NOTIFICATION_CENTER_ITEMS() { // fn#39750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6283, offset: 0x010e9695, size: 19 bytes, params: 1, frame: 2
|
||||
env0_14.loading = true;
|
||||
}
|
||||
|
||||
function LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE() { // fn#39751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6358, offset: 0x010e96a8, size: 41 bytes, params: 1, frame: 3
|
||||
env0_14.loading = false;
|
||||
env0_14.initialized = true;
|
||||
env0_14.errored = true;
|
||||
}
|
||||
|
||||
function LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS_39752({items, hasMore, cursor}) { // fn#39752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6470, offset: 0x010e96d1, size: 281 bytes, params: 2, frame: 19
|
||||
var r3;
|
||||
var binding;
|
||||
var length;
|
||||
var notifCenterItems;
|
||||
var items2;
|
||||
var value6;
|
||||
var value7;
|
||||
if (env0_14.loading) {
|
||||
env0_14.loading = false;
|
||||
env0_14.initialized = true;
|
||||
env0_14.errored = false;
|
||||
env0_14.isDataStale = false;
|
||||
r3 = cursor != null && env0_14.notifCenterIds.has(cursor);
|
||||
if (!r3) {
|
||||
binding = env0_14;
|
||||
length = items.length;
|
||||
r3 = length > 0 && hasMore;
|
||||
binding.paginationHasMore = r3;
|
||||
binding = env0_14;
|
||||
length = items.length;
|
||||
r3 = length > 0 ? cursor : undefined;
|
||||
binding.paginationCursor = r3;
|
||||
}
|
||||
binding = env0_14;
|
||||
notifCenterItems = binding.notifCenterItems;
|
||||
items2 = [];
|
||||
value6 = arraySpread(items2, notifCenterItems, 0, undefined);
|
||||
value7 = items.map(toNotificationCenterItem);
|
||||
arraySpread(items2, value7.filter(_fun39753), value6, value7);
|
||||
binding.notifCenterItems = items2;
|
||||
notifCenterItems = env0_14.notifCenterItems;
|
||||
notifCenterItems.sort(_fun39754);
|
||||
items.forEach(_fun39755);
|
||||
}
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_SET_ACTIVE({active}) { // fn#39757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:7020, offset: 0x010e983e, size: 26 bytes, params: 2, frame: 2
|
||||
env0_14.notifCenterActive = active;
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_TAB_FOCUSED({focused}) { // fn#39758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:7112, offset: 0x010e9858, size: 26 bytes, params: 2, frame: 2
|
||||
env0_14.notifCenterTabFocused = focused;
|
||||
}
|
||||
|
||||
function RELATIONSHIP_REMOVE_39759(a0) { // fn#39759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:7295, offset: 0x010e9872, size: 47 bytes, params: 2, frame: 12
|
||||
const env0_0 = a0;
|
||||
const binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39760);
|
||||
}
|
||||
|
||||
function GAME_RELATIONSHIP_ADD({gameRelationship}) { // fn#39761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:7610, offset: 0x010e9928, size: 244 bytes, params: 2, frame: 19
|
||||
var binding;
|
||||
var notifCenterLocalItems;
|
||||
var user;
|
||||
var items2;
|
||||
var value5;
|
||||
const id = gameRelationship.id;
|
||||
const type = gameRelationship.type;
|
||||
const since = gameRelationship.since;
|
||||
const applicationId = gameRelationship.applicationId;
|
||||
var value;
|
||||
if (RelationshipStore.isBlockedOrIgnored(id)) {
|
||||
return false;
|
||||
}
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
if (type === PENDING_INCOMING) {
|
||||
user = UserStore.getUser(id);
|
||||
if (since != null && user != null) {
|
||||
binding = env0_14;
|
||||
notifCenterLocalItems = binding.notifCenterLocalItems;
|
||||
items2 = [];
|
||||
value5 = arraySpread(items2, notifCenterLocalItems, 0, undefined);
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
items2[value5] = value.incomingGameFriendRequestLocalItem(user, since, applicationId);
|
||||
value5 + 1;
|
||||
binding.notifCenterLocalItems = items2;
|
||||
}
|
||||
} else {
|
||||
var FRIEND = RelationshipTypes.FRIEND;
|
||||
if (type !== FRIEND) {
|
||||
return false;
|
||||
}
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.map(_fun39762);
|
||||
}
|
||||
}
|
||||
|
||||
function GAME_RELATIONSHIP_REMOVE({userId, applicationId}) { // fn#39763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:8321, offset: 0x010e9ae2, size: 61 bytes, params: 2, frame: 12
|
||||
const binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39764);
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_ITEM_COMPLETED({item_enum}) { // fn#39765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:8692, offset: 0x010e9b9c, size: 67 bytes, params: 2, frame: 13
|
||||
const binding = env0_14;
|
||||
const value2 = binding.notifCenterItems.map(function(a0) {
|
||||
var r0;
|
||||
var object;
|
||||
var value = a0;
|
||||
var item_enum2 = value.item_enum;
|
||||
if (item_enum2 !== item_enum) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object = {};
|
||||
copyDataProperties(object, value, item_enum2);
|
||||
object['completed'] = true;
|
||||
object['acked'] = true;
|
||||
r0 = object;
|
||||
}
|
||||
return r0;
|
||||
});
|
||||
binding.notifCenterItems = value2.filter(_validate);
|
||||
}
|
||||
|
||||
function MOBILE_NATIVE_UPDATE_CHECK_FINISHED({newBuild}) { // fn#39768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:8938, offset: 0x010e9c1b, size: 152 bytes, params: 2, frame: 17
|
||||
var value;
|
||||
var value2;
|
||||
var notifCenterLocalItems;
|
||||
var binding;
|
||||
var items2;
|
||||
if (newBuild !== null) {
|
||||
value2 = (require(4788) /* metro dependency 4788: NotificationCenterUtils */).mobileNativeUpdateAvailableLocalItem(newBuild);
|
||||
notifCenterLocalItems = env0_14.notifCenterLocalItems;
|
||||
if (notifCenterLocalItems.find(_fun39769) === undefined) {
|
||||
binding = env0_14;
|
||||
value = binding.notifCenterLocalItems.filter(_fun39770);
|
||||
items2 = [];
|
||||
value = arraySpread(items2, value, 0, notifCenterLocalItems);
|
||||
items2[value] = value2;
|
||||
value + 1;
|
||||
binding.notifCenterLocalItems = items2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function APPLICATIONS_FETCH_SUCCESS_39771({unknownApplicationIds}) { // fn#39771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:9238, offset: 0x010e9ce9, size: 94 bytes, params: 2, frame: 13
|
||||
var set;
|
||||
var binding;
|
||||
if (unknownApplicationIds != null) {
|
||||
set = new global.Set(unknownApplicationIds);
|
||||
binding = env0_14;
|
||||
binding.notifCenterLocalItems = binding.notifCenterLocalItems.filter(_fun39772);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun39714({id}, {id}) { // fn#39714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:1774, offset: 0x010e8bc8, size: 55 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).compare(id, id);
|
||||
}
|
||||
|
||||
function _fun39716(a0) { // fn#39716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:1883, offset: 0x010e8c43, size: 61 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var object2;
|
||||
const value = a0;
|
||||
const binding = env0_0;
|
||||
if (binding.includes(value.id)) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, binding);
|
||||
object2['acked'] = require;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun39720(a0) { // fn#39720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:2555, offset: 0x010e8e20, size: 207 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var object2;
|
||||
let value = a0;
|
||||
const isItemBinding = isItem;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
const user2 = relationship.user;
|
||||
if (isItemBinding(value, INCOMING_FRIEND_REQUESTS, user2.id)) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
object2['acked'] = true;
|
||||
object2['forceUnacked'] = false;
|
||||
value = 'incoming_friend_requests_accepted_' + user.id + '_' + value.id;
|
||||
object2['local_id'] = value;
|
||||
object2['type'] = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun39721(a0) { // fn#39721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:2893, offset: 0x010e8eef, size: 204 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const isItemBinding = isItem;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
let r0 = isItemBinding(a0, INCOMING_FRIEND_REQUESTS, id) || isItem(a0,
|
||||
NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED, id);
|
||||
r0 = !r0 ? isItem(a0, NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS, id) : r0;
|
||||
r0 = !r0 ? isItem(a0, NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED, id) : r0;
|
||||
return !r0;
|
||||
}
|
||||
|
||||
function _fun39723(a0) { // fn#39723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:3312, offset: 0x010e8ff6, size: 107 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var object2;
|
||||
const value = a0;
|
||||
const type = value.type;
|
||||
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
|
||||
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
|
||||
if (type !== GUILD_SCHEDULED_EVENT_STARTED) {
|
||||
r0 = value;
|
||||
} else if (value.guild_scheduled_event_id !== env0_0.id) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, require);
|
||||
object2['disable_action'] = true;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_39726(a0) { // fn#39726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:3828, offset: 0x010e91fc, size: 137 bytes, params: 2, frame: 17
|
||||
var value2;
|
||||
var object2;
|
||||
this.waitFor(UserStore, RelationshipStore, ExperimentStore);
|
||||
if (a0 != null) {
|
||||
value2 = a0.notifCenterItems.map(function(a0) {
|
||||
var r4;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r4);
|
||||
object['message'] = a0.message != null ? new MessageRecord() : undefined;
|
||||
return object;
|
||||
});
|
||||
if (value2.length > 0) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env1_14, undefined);
|
||||
object2['initialized'] = true;
|
||||
object2['isDataStale'] = true;
|
||||
object2['notifCenterItems'] = [];
|
||||
object2['staleNotifCenterItems'] = value2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function value_39728() { // fn#39728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4086, offset: 0x010e92cf, size: 83 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
const closure = function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
object['message'] = a0.message?.toJS();
|
||||
return object;
|
||||
};
|
||||
const object2 = {};
|
||||
const value = environment.__proto__;
|
||||
copyDataProperties(object2, env1_14, undefined);
|
||||
object2['notifCenterItems'] = env1_14.notifCenterItems.map(closure);
|
||||
object2['staleNotifCenterItems'] = env1_14.staleNotifCenterItems.map(closure);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function get_39730() { // fn#39730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4302, offset: 0x010e935b, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.loading;
|
||||
}
|
||||
|
||||
function get_39731() { // fn#39731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4355, offset: 0x010e936a, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.initialized;
|
||||
}
|
||||
|
||||
function get_39732() { // fn#39732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4406, offset: 0x010e9379, size: 36 bytes, params: 1, frame: 3
|
||||
const isDataStale = env1_14.isDataStale;
|
||||
const binding = env1_14;
|
||||
return isDataStale ? binding.staleNotifCenterItems : binding.notifCenterItems;
|
||||
}
|
||||
|
||||
function get_39733() { // fn#39733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4502, offset: 0x010e939d, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.paginationHasMore;
|
||||
}
|
||||
|
||||
function get_39734() { // fn#39734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4560, offset: 0x010e93ac, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.paginationCursor;
|
||||
}
|
||||
|
||||
function get_39735() { // fn#39735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4618, offset: 0x010e93bb, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.errored;
|
||||
}
|
||||
|
||||
function get_39736() { // fn#39736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4666, offset: 0x010e93ca, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.notifCenterActive;
|
||||
}
|
||||
|
||||
function get_39737() { // fn#39737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4728, offset: 0x010e93d9, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.notifCenterLocalItems;
|
||||
}
|
||||
|
||||
function get_39738() { // fn#39738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:4794, offset: 0x010e93e8, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_14.notifCenterTabFocused;
|
||||
}
|
||||
|
||||
function _fun39740({id, type, since, is_spam_request, user_ignored, origin_application_id}) { // fn#39740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:5073, offset: 0x010e9474, size: 165 bytes, params: 2, frame: 19
|
||||
if (user_ignored) {
|
||||
env0_1.add(id);
|
||||
}
|
||||
let value = environment.__proto__;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
if (type !== PENDING_INCOMING) {
|
||||
return null;
|
||||
}
|
||||
if (is_spam_request) {
|
||||
return null;
|
||||
}
|
||||
if (user_ignored) {
|
||||
return null;
|
||||
}
|
||||
if (since == null) {
|
||||
return null;
|
||||
}
|
||||
const user = UserStore.getUser(id);
|
||||
if (user == null) {
|
||||
return null;
|
||||
}
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
Reflect.apply(push, binding, [value.incomingFriendRequestLocalItem(user, since, origin_application_id)]);
|
||||
}
|
||||
|
||||
function _fun39741({type, id, application_id, since}) { // fn#39741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:5364, offset: 0x010e9519, size: 136 bytes, params: 2, frame: 18
|
||||
var binding;
|
||||
var user;
|
||||
var push;
|
||||
let value = environment.__proto__;
|
||||
const PENDING_INCOMING = RelationshipTypes.PENDING_INCOMING;
|
||||
if (type === PENDING_INCOMING) {
|
||||
binding = env0_1;
|
||||
if (!binding.has(id)) {
|
||||
user = UserStore.getUser(id);
|
||||
if (user != null) {
|
||||
binding = env0_0;
|
||||
push = binding.push;
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
Reflect.apply(push, binding, [value.incomingGameFriendRequestLocalItem(user, since, application_id)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun39742({guild_scheduled_events}) { // fn#39742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:5554, offset: 0x010e95a1, size: 30 bytes, params: 2, frame: 11
|
||||
guild_scheduled_events.forEach(function(a0) {
|
||||
updateGuildEvent(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun39753({id}) { // fn#39753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6793, offset: 0x010e97ea, size: 36 bytes, params: 2, frame: 11
|
||||
const notifCenterIds = env1_14.notifCenterIds;
|
||||
return !notifCenterIds.has(id);
|
||||
}
|
||||
|
||||
function _fun39755({id}) { // fn#39755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:6900, offset: 0x010e980e, size: 33 bytes, params: 2, frame: 11
|
||||
return env1_14.notifCenterIds.add(id);
|
||||
}
|
||||
|
||||
function _fun39760(a0) { // fn#39760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:7388, offset: 0x010e98a1, size: 135 bytes, params: 2, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const isItemBinding = isItem;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
return !isItemBinding(a0, INCOMING_FRIEND_REQUESTS, env0_0.relationship.id) && !isItem(a0,
|
||||
NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED, env0_0.relationship.id);
|
||||
}
|
||||
|
||||
function _fun39762(a0) { // fn#39762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:8012, offset: 0x010e9a1c, size: 198 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var object2;
|
||||
let value = a0;
|
||||
const isGameRelationshipItemBinding = isGameRelationshipItem;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
const idBinding = id;
|
||||
if (isGameRelationshipItemBinding(value, INCOMING_GAME_FRIEND_REQUESTS, idBinding, applicationId)) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, idBinding);
|
||||
object2['acked'] = true;
|
||||
object2['forceUnacked'] = false;
|
||||
value = 'incoming_game_friend_requests_accepted_' + id + '_' + value.id;
|
||||
object2['local_id'] = value;
|
||||
object2['type'] = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
|
||||
r0 = object2;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun39764(a0) { // fn#39764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:8443, offset: 0x010e9b1f, size: 125 bytes, params: 2, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const isGameRelationshipItemBinding = isGameRelationshipItem;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
return !isGameRelationshipItemBinding(a0, INCOMING_GAME_FRIEND_REQUESTS, userId,
|
||||
applicationId) && !isGameRelationshipItem(a0,
|
||||
NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED, userId, applicationId);
|
||||
}
|
||||
|
||||
function _fun39769({local_id}) { // fn#39769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:9093, offset: 0x010e9cb3, size: 28 bytes, params: 2, frame: 2
|
||||
return local_id === env0_0.local_id;
|
||||
}
|
||||
|
||||
function _fun39770({kind}) { // fn#39770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:9184, offset: 0x010e9ccf, size: 26 bytes, params: 2, frame: 2
|
||||
return kind !== env0_0.kind;
|
||||
}
|
||||
|
||||
function _fun39772(a0) { // fn#39772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4801:9390, offset: 0x010e9d47, size: 44 bytes, params: 2, frame: 12
|
||||
return a0.applicationId == null || !env0_0.has(a0.applicationId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 4624; source: modules/notification_center/NotificationCenterItemsTypes.tsx; dependencies: [2] */
|
||||
function _fun39773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4802:6, offset: 0x010e9d73, size: 555 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const object = {UPDATE_PROFILE: 0};
|
||||
object[0] = 'UPDATE_PROFILE';
|
||||
object.FIND_FRIENDS = 1;
|
||||
object[1] = 'FIND_FRIENDS';
|
||||
object.ADD_FRIEND = 2;
|
||||
object[2] = 'ADD_FRIEND';
|
||||
object.FIRST_MESSAGE = 3;
|
||||
object[3] = 'FIRST_MESSAGE';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterItemsTypes.tsx');
|
||||
exports.NotificationCenterScenes = {LANDING: 'notification_center_landing'};
|
||||
exports.ItemEnum = object;
|
||||
exports.NotificationCenterActionTypes = {MARK_ALL_READ: 'mark_all_read', CLICKED: 'clicked',
|
||||
FRIEND_REQUESTS_BUTTON_CLICK: 'friend_requests_button_click', ACTION_BUTTON: 'action_button'};
|
||||
exports.NotificationCenterTabs = {ForYou: 'ForYou', Mentions: 'Mentions', MessageReminders: 'MessageReminders'};
|
||||
exports.NotificationCenterItems = {GO_LIVE_PUSH: 'go_live_push', FRIEND_REQUEST_ACCEPTED: 'friend_request_accepted',
|
||||
FRIEND_REQUEST_PENDING: 'friend_request_pending', FRIEND_SUGGESTION_CREATED: 'friend_suggestion_created',
|
||||
FRIEND_REQUEST_REMINDER: 'friend_request_reminder', DM_FRIEND_NUDGE: 'dm_friend_nudge',
|
||||
RECENT_MENTION: 'recent_mention', REPLY_MENTION: 'reply_mention',
|
||||
GUILD_SCHEDULED_EVENT_STARTED: 'scheduled_guild_event_started', SYSTEM_DEMO: 'system_demo',
|
||||
MISSED_MESSAGES: 'missed_messages', TOP_MESSAGES: 'top_messages', LIFECYCLE_ITEM: 'lifecycle_item',
|
||||
TRENDING_CONTENT: 'trending_content', GAME_FRIEND_REQUEST_ACCEPTED: 'game_friend_request_accepted',
|
||||
REACTION_SENT: 'reaction_sent', REFERRAL_PROGRAM_ENTRYPOINT_REMINDER: 'referral_program_entrypoint_reminder'};
|
||||
exports.NotificationCenterLocalItems = {INCOMING_FRIEND_REQUESTS: 'INCOMING_FRIEND_REQUESTS',
|
||||
INCOMING_FRIEND_REQUESTS_ACCEPTED: 'INCOMING_FRIEND_REQUESTS_ACCEPTED',
|
||||
FRIEND_REQUESTS_GROUPED: 'FRIEND_REQUESTS_GROUPED',
|
||||
MOBILE_NATIVE_UPDATE_AVAILABLE: 'MOBILE_NATIVE_UPDATE_AVAILABLE',
|
||||
INCOMING_GAME_FRIEND_REQUESTS: 'INCOMING_GAME_FRIEND_REQUESTS',
|
||||
INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED: 'INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/* Metro module 14775; source: modules/notification_center/NotificationCenterStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 5215, 672, 4624, 21, 566, 694, 2] */
|
||||
function _fun111548(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:6, offset: 0x023a698e, size: 435 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
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 = importDefault(57) /* metro dependency 57 */;
|
||||
const recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const DAY = Millis.DAY;
|
||||
const env0_10 = 90 * DAY;
|
||||
({'tab': null, 'localItemAcks': null, 'hasNewMentions': false, 'isDataStale': false,
|
||||
'isRefreshing': false}).localItemAcks = {};
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
let value = _fun111553(PersistedStore);
|
||||
value.displayName = 'NotificationCenterStore';
|
||||
value.persistKey = 'NotificationCenterStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {MESSAGE_CREATE: MESSAGE_CREATE_111563,
|
||||
NOTIFICATION_CENTER_SET_TAB: NOTIFICATION_CENTER_SET_TAB,
|
||||
NOTIFICATION_CENTER_ITEMS_LOCAL_ACK: function({localIds}) {
|
||||
localIds.forEach(_fun111566);
|
||||
}, NOTIFICATION_CENTER_REFRESH: NOTIFICATION_CENTER_REFRESH, LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE: closure,
|
||||
LOAD_NOTIFICATION_CENTER_ITEMS_SUCCESS: closure});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_111549() { // fn#111549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:168, offset: 0x023a6b41, 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_111549_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function LOAD_NOTIFICATION_CENTER_ITEMS_FAILURE_111552() { // fn#111552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1656, offset: 0x023a6ba3, size: 39 bytes, params: 1, frame: 3
|
||||
env0_11.hasNewMentions = false;
|
||||
env0_11.isDataStale = false;
|
||||
env0_11.isRefreshing = false;
|
||||
}
|
||||
|
||||
function _fun111553(a0) { // fn#111553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:474, offset: 0x023a6bca, size: 251 bytes, params: 2, frame: 16
|
||||
const closure = NotificationCenterStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: value_111555}, {key: 'getState', value: value_111556},
|
||||
{key: 'getTab', value: value_111557}, {key: 'isLocalItemAcked', value: value_111558}, {key: 'hasNewMentions',
|
||||
value: value_111559}, {key: 'isDataStale', value: value_111560}, {key: 'isRefreshing', value: value_111561},
|
||||
{key: 'shouldReload', value: value_111562}]);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_111563({message}) { // fn#111563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1857, offset: 0x023a6e6a, size: 52 bytes, params: 2, frame: 12
|
||||
if (RecentMentionsStore.hasMention(message.id)) {
|
||||
env0_11.hasNewMentions = true;
|
||||
}
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_SET_TAB({tab}) { // fn#111564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1970, offset: 0x023a6e9e, size: 42 bytes, params: 2, frame: 13
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_11, undefined);
|
||||
object2['tab'] = tab;
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_ITEMS_LOCAL_ACK({localIds}) { // fn#111565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2051, offset: 0x023a6ec8, size: 32 bytes, params: 2, frame: 11
|
||||
localIds.forEach(_fun111566);
|
||||
}
|
||||
|
||||
function NOTIFICATION_CENTER_REFRESH() { // fn#111567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2190, offset: 0x023a6f35, size: 19 bytes, params: 1, frame: 2
|
||||
env0_11.isRefreshing = true;
|
||||
}
|
||||
|
||||
function value_111555(a0) { // fn#111555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:819, offset: 0x023a6cc5, size: 181 bytes, params: 2, frame: 23
|
||||
var r5;
|
||||
var r4;
|
||||
var object2;
|
||||
var value2;
|
||||
var length;
|
||||
var value3;
|
||||
var property;
|
||||
var value4;
|
||||
var property2;
|
||||
var Date;
|
||||
var now;
|
||||
var value5;
|
||||
var value6;
|
||||
this.waitFor(RecentMentionsStore);
|
||||
if (a0 != null) {
|
||||
env1_11 = a0;
|
||||
r5 = a0.localItemAcks ?? ({});
|
||||
object2 = {};
|
||||
value2 = global.Object.entries(r5);
|
||||
length = value2.length;
|
||||
value3 = 0;
|
||||
if (value3 < length) {
|
||||
r4 = value3;
|
||||
while (true) {
|
||||
property = value2[r4];
|
||||
value4 = env1_8(property, 2);
|
||||
property = value4[value3];
|
||||
property2 = value4[1];
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value5 = Reflect.apply(now, Date, []) - property2;
|
||||
if (value5 < env1_10) {
|
||||
object2[property] = property2;
|
||||
}
|
||||
value6 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
||||
length = value2.length;
|
||||
if (value6 < length) {
|
||||
r4 = value6;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
a0.localItemAcks = object2;
|
||||
env1_11.isDataStale = true;
|
||||
}
|
||||
}
|
||||
|
||||
function value_111557() { // fn#111557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1141, offset: 0x023a6d7a, size: 55 bytes, params: 1, frame: 12
|
||||
return env1_11.tab ?? (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterTabs.ForYou;
|
||||
}
|
||||
|
||||
function value_111558(a0) { // fn#111558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1253, offset: 0x023a6db1, size: 99 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var r0;
|
||||
var value2;
|
||||
var defaultImport;
|
||||
let value = a0.local_id != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value2 = env1_11.localItemAcks[a0.local_id] != null;
|
||||
if (value2) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
r1 = defaultImport.age(a0.id) > env1_10;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_111559() { // fn#111559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1377, offset: 0x023a6e14, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_11.hasNewMentions;
|
||||
}
|
||||
|
||||
function value_111560() { // fn#111560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1439, offset: 0x023a6e23, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_11.isDataStale;
|
||||
}
|
||||
|
||||
function value_111561() { // fn#111561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1499, offset: 0x023a6e32, size: 15 bytes, params: 1, frame: 1
|
||||
return env1_11.isRefreshing;
|
||||
}
|
||||
|
||||
function value_111562() { // fn#111562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:1560, offset: 0x023a6e41, size: 41 bytes, params: 1, frame: 3
|
||||
let r0 = env1_11.hasNewMentions || env1_11.isDataStale;
|
||||
r0 = !r0 ? env1_11.isRefreshing : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111566(a0) { // fn#111566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14972:2095, offset: 0x023a6ee8, size: 77 bytes, params: 2, frame: 14
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, env1_11, undefined);
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, env1_11.localItemAcks, undefined);
|
||||
const Date = global.Date;
|
||||
object4[a0] = Date.now();
|
||||
object3['localItemAcks'] = object4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
/* Metro module 14779; source: modules/notification_center/NotificationCenterStoreActions.tsx; dependencies: [694, 2] */
|
||||
function _fun111619(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:6, offset: 0x023a8288, size: 125 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterStoreActions.tsx');
|
||||
exports.setTab = setTab;
|
||||
exports.clearNotificationGuildMentions = clearNotificationGuildMentions;
|
||||
exports.refreshNotifications = refreshNotifications;
|
||||
}
|
||||
|
||||
function setTab(a0) { // fn#111620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:197, offset: 0x023a8305, size: 56 bytes, params: 2, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_SET_TAB', tab: a0});
|
||||
}
|
||||
|
||||
function clearNotificationGuildMentions() { // fn#111621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:311, offset: 0x023a833d, size: 48 bytes, params: 1, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_CLEAR_GUILD_MENTIONS'});
|
||||
}
|
||||
|
||||
function refreshNotifications() { // fn#111622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14976:445, offset: 0x023a836d, size: 48 bytes, params: 1, frame: 13
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'NOTIFICATION_CENTER_REFRESH'});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
/* Metro module 4788; source: modules/notification_center/NotificationCenterUtils.tsx; dependencies: [4789, 3829, 21, 4624, 2] */
|
||||
function _fun41354(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:6, offset: 0x0111cc1c, size: 156 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/NotificationCenterUtils.tsx');
|
||||
exports.getRelativeTimestamp = getRelativeTimestamp;
|
||||
exports.isRemoteAcked = isRemoteAcked;
|
||||
exports.incomingFriendRequestLocalItem = incomingFriendRequestLocalItem;
|
||||
exports.incomingGameFriendRequestLocalItem = incomingGameFriendRequestLocalItem;
|
||||
exports.mobileNativeUpdateAvailableLocalItem = mobileNativeUpdateAvailableLocalItem;
|
||||
exports.isMentionItem = isMentionItem;
|
||||
}
|
||||
|
||||
function getRelativeTimestamp(a0) { // fn#41355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:204, offset: 0x0111ccb8, size: 89 bytes, params: 2, frame: 15
|
||||
let value = a1;
|
||||
let r3 = !(value !== undefined) || value;
|
||||
const defaultImport = importDefault(4789) /* metro dependency 4789: getTimestampString */;
|
||||
value = require(4789) /* metro dependency 4789: getTimestampString */;
|
||||
r3 = r3 ? value.getAbbreviatedFormatter : value.getFullFormatter;
|
||||
return defaultImport({since: a0, getFormatter: r3});
|
||||
}
|
||||
|
||||
function isRemoteAcked(a0, a1) { // fn#41356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:321, offset: 0x0111cd11, size: 101 bytes, params: 3, frame: 17
|
||||
var r1;
|
||||
var r0;
|
||||
var value;
|
||||
var value2;
|
||||
const acked = a0.acked;
|
||||
if (acked) {
|
||||
r0 = acked;
|
||||
} else {
|
||||
value2 = a1 !== (require(3829) /* metro dependency 3829: UserSettings */).NOTIFICATION_CENTER_ACKED_BEFORE_ID_UNSET;
|
||||
if (value2) {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a1, a0.id);
|
||||
value = value >= 0;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value2;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function incomingFriendRequestLocalItem(a0, a1, a2) { // fn#41357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:452, offset: 0x0111cd76, size: 215 bytes, params: 4, frame: 21
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const fromTimestamp = defaultImport.fromTimestamp;
|
||||
const Date = global.Date;
|
||||
const date = new Date(a1);
|
||||
const getTime = date.getTime;
|
||||
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
|
||||
const object2 = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
|
||||
object2.other_user = a0;
|
||||
object2.local_id = 'incoming_friend_requests_' + a0.id + '_' + value4;
|
||||
object2.deeplink = 'https://discord.com/users/' + a0.id;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
object2.type = INCOMING_FRIEND_REQUESTS;
|
||||
object2.id = value4;
|
||||
object2.applicationId = a2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function incomingGameFriendRequestLocalItem(a0, a1, a2) { // fn#41358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:848, offset: 0x0111ce4d, size: 215 bytes, params: 4, frame: 21
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const fromTimestamp = defaultImport.fromTimestamp;
|
||||
const Date = global.Date;
|
||||
const date = new Date(a1);
|
||||
const getTime = date.getTime;
|
||||
const value4 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
|
||||
const object2 = {'acked': false, 'forceUnacked': true, 'other_user': null, 'kind': 'notification-center-item'};
|
||||
object2.other_user = a0;
|
||||
object2.local_id = 'incoming_game_friend_requests_' + a0.id + '_' + value4;
|
||||
object2.deeplink = 'https://discord.com/users/' + a0.id;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
object2.type = INCOMING_GAME_FRIEND_REQUESTS;
|
||||
object2.id = value4;
|
||||
object2.applicationId = a2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function mobileNativeUpdateAvailableLocalItem({build, urls}) { // fn#41359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1260, offset: 0x0111cf24, size: 190 bytes, params: 2, frame: 18
|
||||
const object2 = {'acked': false, 'enableBadge': true, 'id': null, 'kind': 'notification-center-item'};
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
const fromTimestamp = defaultImport.fromTimestamp;
|
||||
const Date = global.Date;
|
||||
const date = new Date();
|
||||
const getTime = date.getTime;
|
||||
object2.id = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, date, [])]);
|
||||
object2.local_id = 'mobile_update_available_' + build;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
|
||||
object2.type = MOBILE_NATIVE_UPDATE_AVAILABLE;
|
||||
object2.deeplink = urls.install.toString();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function isMentionItem(a0) { // fn#41360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4966:1591, offset: 0x0111cfe2, size: 92 bytes, params: 2, frame: 15
|
||||
const type = a0.type;
|
||||
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
|
||||
const RECENT_MENTION = NotificationCenterItems.RECENT_MENTION;
|
||||
return type === RECENT_MENTION || a0.type === NotificationCenterItems.REPLY_MENTION;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,188 @@
|
||||
/* Metro module 14787; source: modules/notification_center/getNotificationCenterItemBody.tsx; dependencies: [4117, 1867, 3793, 1878, 661, 1244, 3995, 4624, 1861, 44, 2] */
|
||||
function _fun111695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:6, offset: 0x023acf2c, size: 257 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
|
||||
const env0_4 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildEventEnded;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = constantsModule.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_9 = constantsModule.RelationshipTypes;
|
||||
const env0_10 = RegExp('[\\\\`*_~|<>[\\]:]', 'g');
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/getNotificationCenterItemBody.tsx');
|
||||
exports.default = getNotificationCenterItemBody;
|
||||
}
|
||||
|
||||
function escapeMarkdown(a0) { // fn#111696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:247, offset: 0x023ad02d, size: 37 bytes, params: 2, frame: 13
|
||||
if (a0 !== undefined) {
|
||||
return a0.replace(env0_10, '\\$&');
|
||||
}
|
||||
}
|
||||
|
||||
function getFriendRequestItemBody({username, applicationId, renderApplication, withApplication, withDefault}) { // fn#111697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:315, offset: 0x023ad052, size: 160 bytes, params: 2, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return applicationId != null ? intl.format(withApplication, {username: username, applicationName: function() {
|
||||
return renderApplication(applicationId);
|
||||
}}) : intl.format(withDefault, {username: username});
|
||||
}
|
||||
|
||||
function getNotificationCenterItemBody({item, renderApplication}) { // fn#111699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14984:649, offset: 0x023ad0f2, size: 1960 bytes, params: 2, frame: 25
|
||||
var r3;
|
||||
var r6;
|
||||
var name;
|
||||
var name2;
|
||||
var length;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var format;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object2;
|
||||
var guild_scheduled_event_id;
|
||||
var value9;
|
||||
var isGuildEventEndedBinding;
|
||||
var isGuildEventEnded2;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
var AyvfXR;
|
||||
var local_id;
|
||||
var defaultImport4;
|
||||
var other_users;
|
||||
var value11;
|
||||
var defaultImport5;
|
||||
var value12;
|
||||
var Math;
|
||||
var max;
|
||||
var value13;
|
||||
let value = undefined;
|
||||
let other_user = item.other_user;
|
||||
let id = other_user == null ? value : other_user.id;
|
||||
const r5 = id ?? EMPTY_STRING_SNOWFLAKE_ID;
|
||||
let escapeMarkdownBinding = escapeMarkdown;
|
||||
const defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
let getName = defaultImport.getName;
|
||||
let getUser = UserStore.getUser;
|
||||
other_user = item.other_user;
|
||||
const value5 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport, [Reflect.apply(getUser, UserStore,
|
||||
[other_user == null ? value : other_user.id])]));
|
||||
const applicationId = item.applicationId;
|
||||
const type = item.type;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
|
||||
if (FRIEND_REQUESTS_GROUPED === type) {
|
||||
escapeMarkdownBinding = escapeMarkdown;
|
||||
defaultImport4 = defaultImport;
|
||||
getName = defaultImport4.getName;
|
||||
getUser = UserStore.getUser;
|
||||
other_users = item.other_users;
|
||||
id = other_users == null || other_users[0] == null ? value : other_users[0].id;
|
||||
value11 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport4, [Reflect.apply(getUser, UserStore,
|
||||
[id])]));
|
||||
escapeMarkdownBinding = escapeMarkdown;
|
||||
defaultImport5 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
getName = defaultImport5.getName;
|
||||
getUser = UserStore.getUser;
|
||||
other_users = item.other_users;
|
||||
id = other_users == null || other_users[1] == null ? value : other_users[1].id;
|
||||
value12 = escapeMarkdownBinding(Reflect.apply(getName, defaultImport5, [Reflect.apply(getUser, UserStore,
|
||||
[id])]));
|
||||
Math = global.Math;
|
||||
max = Math.max;
|
||||
other_users = item.other_users;
|
||||
length = other_users == null ? value : other_users.length;
|
||||
value13 = 0;
|
||||
return intl.format(t.g5xyIC, {user: value11, user2: value12, count: Reflect.apply(max, Math,
|
||||
[(length ?? value13) - 2, value13])});
|
||||
}
|
||||
const MOBILE_NATIVE_UPDATE_AVAILABLE = NotificationCenterLocalItems.MOBILE_NATIVE_UPDATE_AVAILABLE;
|
||||
if (MOBILE_NATIVE_UPDATE_AVAILABLE === type) {
|
||||
local_id = item.local_id;
|
||||
if (local_id == null) {
|
||||
r3 = value;
|
||||
} else {
|
||||
value = local_id.split('_');
|
||||
value = value.pop();
|
||||
r3 = value;
|
||||
}
|
||||
value = 'unknown';
|
||||
return 'Update to build ' + (r3 ?? value) + ' available!';
|
||||
}
|
||||
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
|
||||
const FRIEND_SUGGESTION_CREATED = NotificationCenterItems.FRIEND_SUGGESTION_CREATED;
|
||||
if (FRIEND_SUGGESTION_CREATED === type) {
|
||||
return RelationshipStore.getRelationshipType(r5) === RelationshipTypes.PENDING_OUTGOING ? intl.format(t.gZVTy2,
|
||||
{user: value5}) : item.body ?? '';
|
||||
}
|
||||
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
|
||||
if (GUILD_SCHEDULED_EVENT_STARTED === type) {
|
||||
guild_scheduled_event_id = item.guild_scheduled_event_id;
|
||||
r6 = guild_scheduled_event_id != null ? GuildScheduledEventStore.getGuildScheduledEvent(guild_scheduled_event_id) : null;
|
||||
name = r6 == null ? value : r6.name;
|
||||
value9 = GuildStore.getGuild(r6 == null ? value : r6.guild_id);
|
||||
name2 = value9 == null ? value : value9.name;
|
||||
isGuildEventEndedBinding = isGuildEventEnded;
|
||||
r3 = r6 ?? value;
|
||||
isGuildEventEnded2 = isGuildEventEndedBinding(r3);
|
||||
moduleValue = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
if (moduleValue.isNullOrEmpty(name2)) {
|
||||
r3 = item.body ?? '';
|
||||
} else {
|
||||
moduleValue2 = require(1861) /* metro dependency 1861: StringUtils */;
|
||||
if (moduleValue2.isNullOrEmpty(name)) {
|
||||
r3 = item.body ?? '';
|
||||
} else if (isGuildEventEnded2) {
|
||||
format = intl.format;
|
||||
AyvfXR = t.AyvfXR;
|
||||
object2 = {};
|
||||
escapeMarkdownBinding = escapeMarkdown;
|
||||
object2.event_name = escapeMarkdownBinding(name);
|
||||
object2.guild_name = escapeMarkdownBinding(name2);
|
||||
r3 = Reflect.apply(format, intl, [AyvfXR, object2]);
|
||||
} else {
|
||||
r3 = item.body ?? '';
|
||||
}
|
||||
}
|
||||
return r3;
|
||||
}
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
if (INCOMING_FRIEND_REQUESTS === type) {
|
||||
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
|
||||
renderApplication: renderApplication, withApplication: t['9Dgf1L'], withDefault: t.uIomXw});
|
||||
}
|
||||
const INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
|
||||
if (INCOMING_FRIEND_REQUESTS_ACCEPTED === type) {
|
||||
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
|
||||
renderApplication: renderApplication, withApplication: t.nnC1q9, withDefault: t['5Uzkdp']});
|
||||
}
|
||||
const FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.FRIEND_REQUEST_ACCEPTED;
|
||||
if (FRIEND_REQUEST_ACCEPTED === type) {
|
||||
return getFriendRequestItemBody({username: value5, applicationId: applicationId,
|
||||
renderApplication: renderApplication, withApplication: t.jXlYiF, withDefault: t.McYRBk});
|
||||
}
|
||||
const INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
|
||||
if (INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED === type) {
|
||||
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
|
||||
'Expected application id for ' + item.type);
|
||||
return intl.format(t['BB/0vn'], {username: value5, applicationName: function() {
|
||||
return renderApplication(applicationId);
|
||||
}});
|
||||
}
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
if (INCOMING_GAME_FRIEND_REQUESTS === type) {
|
||||
(importDefault(44) /* metro dependency 44 */)(applicationId != null,
|
||||
'Expected application id for ' + item.type);
|
||||
return intl.format(t['7cqOLI'], {username: value5, applicationName: function() {
|
||||
return renderApplication(applicationId);
|
||||
}});
|
||||
}
|
||||
const GAME_FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.GAME_FRIEND_REQUEST_ACCEPTED;
|
||||
if (GAME_FRIEND_REQUEST_ACCEPTED === type) {
|
||||
return applicationId == null ? item.body : intl.format(t.Wi64vN, {username: value5,
|
||||
applicationName: function() {
|
||||
return renderApplication(applicationId);
|
||||
}});
|
||||
}
|
||||
return item.body ?? '';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/* Metro module 4789; source: modules/notification_center/getTimestampString.tsx; dependencies: [1244, 3738, 2] */
|
||||
function _fun41361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:6, offset: 0x0111d03e, size: 160 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = getDurationString;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/getTimestampString.tsx');
|
||||
exports.default = getTimestampString;
|
||||
exports.getAbbreviatedFormatter = getAbbreviatedFormatter;
|
||||
exports.getFullFormatter = getFullFormatter;
|
||||
exports.getDurationString = closure;
|
||||
}
|
||||
|
||||
function getDurationString({seconds, getFormatter}) { // fn#41362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:115, offset: 0x0111d0de, size: 514 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var formatToPlainString;
|
||||
var years;
|
||||
var object2;
|
||||
var months;
|
||||
var days;
|
||||
var hours;
|
||||
var minutes;
|
||||
let value = getFormatter();
|
||||
if (seconds < 60) {
|
||||
value = intl.formatToPlainString(value.minutes, {minutes: 1});
|
||||
r0 = value;
|
||||
} else if (seconds < 3600) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
minutes = value.minutes;
|
||||
object2 = {};
|
||||
object2.minutes = global.Math.floor(seconds / 60);
|
||||
value = Reflect.apply(formatToPlainString, intl, [minutes, object2]);
|
||||
r0 = value;
|
||||
} else if (seconds < 86400) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
hours = value.hours;
|
||||
object2 = {};
|
||||
object2.hours = global.Math.floor(seconds / 3600);
|
||||
value = Reflect.apply(formatToPlainString, intl, [hours, object2]);
|
||||
r0 = value;
|
||||
} else if (seconds < env0_3) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
days = value.days;
|
||||
object2 = {};
|
||||
object2.days = global.Math.floor(seconds / 86400);
|
||||
value = Reflect.apply(formatToPlainString, intl, [days, object2]);
|
||||
r0 = value;
|
||||
} else if (seconds < env0_4) {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
months = value.months;
|
||||
object2 = {};
|
||||
object2.months = global.Math.floor(seconds / env0_3);
|
||||
value = Reflect.apply(formatToPlainString, intl, [months, object2]);
|
||||
r0 = value;
|
||||
} else {
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
years = value.years;
|
||||
object2 = {};
|
||||
object2.years = global.Math.floor(seconds / env0_4);
|
||||
value = Reflect.apply(formatToPlainString, intl, [years, object2]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getTimestampString({since, getFormatter}) { // fn#41363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:707, offset: 0x0111d2e0, size: 97 bytes, params: 2, frame: 19
|
||||
const getDurationStringBinding = getDurationString;
|
||||
const object2 = {};
|
||||
const value = (importDefault(3738) /* metro dependency 3738 */)();
|
||||
object2.seconds = value.diff((importDefault(3738) /* metro dependency 3738 */)(since), 's');
|
||||
object2.getFormatter = getFormatter;
|
||||
return getDurationStringBinding(object2);
|
||||
}
|
||||
|
||||
function getAbbreviatedFormatter() { // fn#41364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:870, offset: 0x0111d341, size: 148 bytes, params: 1, frame: 14
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const GBLpQ8 = t.GBLpQ8;
|
||||
const XzBNbS = t.XzBNbS;
|
||||
const I1E8p6 = t.I1E8p6;
|
||||
return {minutes: t['XIGt+W'], hours: t.rhY1Rs, days: GBLpQ8, months: XzBNbS, years: I1E8p6};
|
||||
}
|
||||
|
||||
function getFullFormatter() { // fn#41365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4967:1017, offset: 0x0111d3d5, size: 154 bytes, params: 1, frame: 14
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const SoON3V = t.SoON3V;
|
||||
return {minutes: t['GqQ/Y9'], hours: t.c5zfWZ, days: t.amjnaI, months: SoON3V, years: t['12B3Re']};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* Metro module 14811; source: modules/notification_center/native/ForYouEmptyState.tsx; dependencies: [31, 27, 33, 4501, 5473, 4573, 1244, 2] */
|
||||
function _fun111773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15008:6, offset: 0x023b186c, size: 254 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_3 = value.jsx;
|
||||
const env0_4 = value.jsxs;
|
||||
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({image: {marginBottom: 16},
|
||||
container: {'paddingHorizontal': 48, 'alignItems': 'center', 'justifyContent': 'center'},
|
||||
headerText: {'fontSize': 18, 'marginTop': 16, 'marginBottom': 8}, text: {textAlign: 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouEmptyState.tsx');
|
||||
exports.ForYouEmptyState = ForYouEmptyState;
|
||||
}
|
||||
|
||||
function ForYouEmptyState({height}) { // fn#111774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15008:460, offset: 0x023b196a, size: 371 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const items4 = [styles.container];
|
||||
items4[1] = {height: height};
|
||||
const MailboxSpotIllustration = (require(5473) /* metro dependency 5473: native */).MailboxSpotIllustration;
|
||||
const items2 = [<View style={styles.image}><MailboxSpotIllustration scale={0.75} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let text = styles.text;
|
||||
const items3 = [text];
|
||||
items3[1] = styles.headerText;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const MwjTvn = (require(1244) /* metro dependency 1244: indexNative */).t.MwjTvn;
|
||||
items2[1] = <Text accessibilityRole="header" color="mobile-text-heading-primary" variant="heading-md/bold" style={items3}>{Reflect.apply(string,
|
||||
intl, [MwjTvn])}</Text>;
|
||||
text = styles.text;
|
||||
string = intl.string;
|
||||
const AKBgPy = (require(1244) /* metro dependency 1244: indexNative */).t.AKBgPy;
|
||||
items2[2] = <Text color="text-default" variant="text-md/medium" style={text}>{Reflect.apply(string, intl,
|
||||
[AKBgPy])}</Text>;
|
||||
return (
|
||||
<View style={items4}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 14800; source: modules/notification_center/native/ForYouHoistedItemsHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 2] */
|
||||
function _fun111722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14997:6, offset: 0x023aea4d, size: 207 bytes, params: 8, frame: 21
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_0 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const env0_2 = Reflect.apply(createStyles, createStylesModule, [{container: {marginTop: PX_16}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouHoistedItemsHeader.tsx');
|
||||
exports.ForYouHoistedItemsHeader = ForYouHoistedItemsHeader;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,836 @@
|
||||
/* Metro module 14786; source: modules/notification_center/native/ForYouItemActionButtons.tsx; dependencies: [5, 31, 27, 1379, 1878, 661, 33, 4501, 1239, 4017, 4504, 4572, 4578, 1244, 4573, 632, 8228, 14478, 4093, 4254, 8800, 4624, 4603, 8783, 3857, 11004, 683, 2] */
|
||||
function _fun111666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6, offset: 0x023aaf19, size: 507 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const focusChatInput = function(a0) {
|
||||
var value = undefined;
|
||||
var env0_0 = a0 != null ? {channelId: a0} : value;
|
||||
global.setTimeout(_fun111668, 0);
|
||||
return value;
|
||||
};
|
||||
const closure = IncomingFriendRequestActions;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticEvents;
|
||||
const env0_9 = value.ComponentActions;
|
||||
const env0_10 = value.EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const env0_11 = value.MessageTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({buttonsContainer: {'flexDirection': 'row',
|
||||
'marginTop': 8}, actionButtonsContainer: {'flexDirection': 'row', 'position': 'absolute', 'left': 0}});
|
||||
object = {ACCEPT: 'accept', IGNORE: 'ignore', WAVE: 'wave', ACTION: 'action'};
|
||||
object = {code: "function ForYouItemActionButtonsTsx1(){const{withTiming,pressed}=this.__closure;return{opacity:withTiming(!pressed.get()?1:0,{duration:150}),pointerEvents:!pressed.get()?'auto':'none'};}"};
|
||||
object = {code: "function ForYouItemActionButtonsTsx2(){const{pressed,acceptButtonWidth,buttonWidth,withTiming}=this.__closure;const scaleX=!pressed.get()?acceptButtonWidth.get()/buttonWidth.get():1;const scaledWidth=buttonWidth.get()-buttonWidth.get()*scaleX;const translateX=!pressed.get()?-scaledWidth/2:0;return{transform:[{scaleX:withTiming(scaleX)},{translateX:withTiming(translateX)}],opacity:withTiming(!pressed.get()?0:1),pointerEvents:!pressed.get()?'none':'auto'};}"};
|
||||
object = {code: 'function ForYouItemActionButtonsTsx3(){const{waveWidth,waveHeight}=this.__closure;return{transform:[{translateX:waveWidth.get()/2},{translateY:waveHeight.get()/2}]};}'};
|
||||
object = {code: "function ForYouItemActionButtonsTsx4(){const{withDelay,withRepeat,withTiming,pressed,Easing,waveWidth,waveHeight}=this.__closure;return{transform:[{rotateZ:withDelay(450,withRepeat(withTiming(pressed.get()?'8deg':'-2deg',{duration:150,easing:Easing.inOut(Easing.quad)}),4,true))},{translateX:-waveWidth.get()/2},{translateY:-waveHeight.get()/2}]};}"};
|
||||
object = {code: "function ForYouItemActionButtonsTsx5(){const{pressed}=this.__closure;return{pointerEvents:!pressed.get()?'none':'none'};}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouItemActionButtons.tsx');
|
||||
exports.IncomingFriendRequestActions = closure;
|
||||
exports.useItemActionButtonPropsV2 = useItemActionButtonPropsV2;
|
||||
exports.ForYouItemActionButtons = ForYouItemActionButtons;
|
||||
}
|
||||
|
||||
function focusChatInput(a0) { // fn#111667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:523, offset: 0x023ab114, size: 56 bytes, params: 2, frame: 14
|
||||
const value = undefined;
|
||||
const env0_0 = a0 != null ? {channelId: a0} : value;
|
||||
global.setTimeout(_fun111668, 0);
|
||||
return value;
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActions({onAccept, onIgnore, onWavePress, pressed, compactMode}) { // fn#111669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2004, offset: 0x023ab189, size: 1358 bytes, params: 2, frame: 43
|
||||
const styles = useStyles();
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
|
||||
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(-1);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = IncomingFriendRequestActionsU;
|
||||
let object2 = {};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
object2.pressed = pressed;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 100815030677;
|
||||
closure.__initData = env0_16;
|
||||
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = IncomingFriendRequestActions_;
|
||||
object2 = {pressed: pressed, acceptButtonWidth: value2, buttonWidth: value3};
|
||||
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12358515723480;
|
||||
closure.__initData = env0_17;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = IncomingFriendRequestActionsE;
|
||||
closure.__closure = {waveWidth: value4, waveHeight: value5};
|
||||
closure.__workletHash = 667441788226;
|
||||
closure.__initData = env0_18;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
||||
closure = IncomingFriendRequestActionsI;
|
||||
object2 = {withDelay: reanimatedRexportModule.withDelay, withRepeat: reanimatedRexportModule.withRepeat,
|
||||
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, pressed: pressed};
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
object2.Easing = Easing;
|
||||
object2.waveWidth = value4;
|
||||
object2.waveHeight = value5;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 498167545082;
|
||||
closure.__initData = env0_19;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue9.useAnimatedProps;
|
||||
closure = function() {
|
||||
pressed.get();
|
||||
return {pointerEvents: 'none'};
|
||||
};
|
||||
closure.__closure = {pressed: pressed};
|
||||
closure.__workletHash = 3473531476662;
|
||||
closure.__initData = env0_20;
|
||||
const value10 = Reflect.apply(useAnimatedProps, moduleValue9, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const items2 = [styles.actionButtonsContainer, value6];
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const object3 = {onLayout: onLayout_111675};
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const zf5jU5 = (require(1244) /* metro dependency 1244: indexNative */).t.zf5jU5;
|
||||
const value11 = 'md';
|
||||
const view = <View {...object3}><Button text={Reflect.apply(string, intl,
|
||||
[zf5jU5])} variant="primary" size={compactMode ? 'sm' : value11} onPress={onAccept} key="accept_friend_request" /></View>;
|
||||
string = intl.string;
|
||||
const EBN847 = (require(1244) /* metro dependency 1244: indexNative */).t.EBN847;
|
||||
const view2 = <View2 style={items2}><Stack direction="horizontal" spacing={8}>{view}<Button text={Reflect.apply(string,
|
||||
intl,
|
||||
[EBN847])} variant="secondary" size={compactMode ? 'sm' : value11} onPress={onIgnore} key="ignore_friend_request" /></Stack></View2>;
|
||||
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const view3Props = {style: value7, onLayout: onLayout_111676, ...value10};
|
||||
const buttonProps = {variant: 'secondary',
|
||||
text: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W)};
|
||||
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const View5 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
const object5 = {style: value9, onLayout: onLayout_111677};
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
buttonProps.icon = <View4 style={value8} accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><View5 {...object5}><Text maxFontSizeMultiplier={2} variant="text-sm/normal">{'👋'}</Text></View5></View4>;
|
||||
buttonProps.size = compactMode ? 'sm' : value11;
|
||||
buttonProps.onPress = onWavePress;
|
||||
return (
|
||||
<View>
|
||||
{view2}
|
||||
<View3 {...view3Props}>
|
||||
<Button {...buttonProps} />
|
||||
</View3>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function useItemActionButtonPropsV2(a0, a1, a2, a3, a4, a5, a6, a7) { // fn#111678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4915, offset: 0x023aba6d, size: 3422 bytes, params: 9, frame: 37
|
||||
var r14;
|
||||
var r15;
|
||||
var r2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var k0Q31F;
|
||||
var vBq3iT;
|
||||
var item_enum;
|
||||
var value16;
|
||||
var value17;
|
||||
var value18;
|
||||
var value19;
|
||||
var value20;
|
||||
var value21;
|
||||
var value22;
|
||||
var value23;
|
||||
var hRKdcn;
|
||||
var object2;
|
||||
var object3;
|
||||
var object4;
|
||||
var object5;
|
||||
var object6;
|
||||
var object7;
|
||||
var object8;
|
||||
var object9;
|
||||
var object18;
|
||||
var items17;
|
||||
var object22;
|
||||
var object23;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const env0_3 = a3;
|
||||
const env0_4 = a5;
|
||||
const env0_5 = a6;
|
||||
const other_user = a0.other_user;
|
||||
const value = null;
|
||||
const value2 = undefined;
|
||||
const id = value == other_user ? value2 : other_user.id;
|
||||
const r6 = value != id ? id : EMPTY_STRING_SNOWFLAKE_ID;
|
||||
const channel = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelStore],
|
||||
_fun111679);
|
||||
const canReplyToMessageModule = require(8228) /* metro dependency 8228: canReplyToMessage */;
|
||||
const useCanReplyToMessage = canReplyToMessageModule.useCanReplyToMessage;
|
||||
let message = a0.message;
|
||||
const value5 = Reflect.apply(useCanReplyToMessage, canReplyToMessageModule, [channel, message]);
|
||||
message = a0.message;
|
||||
const type = value == message ? value2 : message.type;
|
||||
const POLL_RESULT = MessageTypes.POLL_RESULT;
|
||||
let binding = env0_4;
|
||||
let useCallback = binding.useCallback;
|
||||
const value6 = Reflect.apply(useCallback, binding, [_fun111680, [r6, a5, a0]]);
|
||||
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
const value8 = binding.useCallback(_fun111681, [a3, value7, a0, r6, a6]);
|
||||
const value9 = binding.useCallback(_fun111683, [a0.applicationId, a0.type, r6]);
|
||||
const value10 = binding.useCallback(function() {
|
||||
if (importDefault != null) {
|
||||
importDefault.navigate('friends', {screen: 'requests'});
|
||||
}
|
||||
}, [a2]);
|
||||
const value11 = binding.useCallback(_fun111685, [r6]);
|
||||
const value12 = binding.useCallback(_fun111687, [r6]);
|
||||
const value14 = binding.useCallback(env0_3(_fun111689), [a1, channel, a0.message_id, a0.message_channel_id]);
|
||||
useCallback = binding.useCallback;
|
||||
object = [a1];
|
||||
object[1] = a0.message_channel_id;
|
||||
const value15 = Reflect.apply(useCallback, binding, [_fun111690, object]);
|
||||
if (a0.disable_action) {
|
||||
return {actionButtons: []};
|
||||
}
|
||||
const type3 = a0.type;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
if (type3 === INCOMING_FRIEND_REQUESTS) {
|
||||
object = {};
|
||||
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
|
||||
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
object23 = {};
|
||||
object23.name = env0_15.WAVE;
|
||||
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
|
||||
r2 = [object23];
|
||||
} else {
|
||||
object18 = {};
|
||||
binding = env0_15;
|
||||
object18.name = binding.ACCEPT;
|
||||
object18.label = intl.string(t.zf5jU5);
|
||||
items17 = [object18];
|
||||
object22 = {};
|
||||
object22.name = binding.IGNORE;
|
||||
object22.label = intl.string(t.EBN847);
|
||||
items17[1] = object22;
|
||||
r2 = items17;
|
||||
}
|
||||
object.accessibilityActions = r2;
|
||||
object.onAccessibilityAction = onAccessibilityAction_111691;
|
||||
return object;
|
||||
}
|
||||
const type4 = a0.type;
|
||||
let INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
|
||||
if (type4 === INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
if (a4(a0)) {
|
||||
object = {};
|
||||
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
|
||||
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
object23 = {};
|
||||
object23.name = env0_15.WAVE;
|
||||
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
|
||||
r2 = [object23];
|
||||
} else {
|
||||
object18 = {};
|
||||
binding = env0_15;
|
||||
object18.name = binding.ACCEPT;
|
||||
object18.label = intl.string(t.zf5jU5);
|
||||
items17 = [object18];
|
||||
object22 = {};
|
||||
object22.name = binding.IGNORE;
|
||||
object22.label = intl.string(t.EBN847);
|
||||
items17[1] = object22;
|
||||
r2 = items17;
|
||||
}
|
||||
object.accessibilityActions = r2;
|
||||
object.onAccessibilityAction = onAccessibilityAction_111691;
|
||||
return object;
|
||||
}
|
||||
}
|
||||
const type5 = a0.type;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
if (type5 === INCOMING_GAME_FRIEND_REQUESTS) {
|
||||
object = {};
|
||||
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
|
||||
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
object23 = {};
|
||||
object23.name = env0_15.WAVE;
|
||||
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
|
||||
r2 = [object23];
|
||||
} else {
|
||||
object18 = {};
|
||||
binding = env0_15;
|
||||
object18.name = binding.ACCEPT;
|
||||
object18.label = intl.string(t.zf5jU5);
|
||||
items17 = [object18];
|
||||
object22 = {};
|
||||
object22.name = binding.IGNORE;
|
||||
object22.label = intl.string(t.EBN847);
|
||||
items17[1] = object22;
|
||||
r2 = items17;
|
||||
}
|
||||
object.accessibilityActions = r2;
|
||||
object.onAccessibilityAction = onAccessibilityAction_111691;
|
||||
return object;
|
||||
}
|
||||
const type6 = a0.type;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED;
|
||||
if (type6 === INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED) {
|
||||
if (a4(a0)) {
|
||||
object = {};
|
||||
object.actionsNode = <IncomingFriendRequestActions onWavePress={value6} onAccept={value8} onIgnore={value9} pressed={value7} compactMode={a7} />;
|
||||
if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
object23 = {};
|
||||
object23.name = env0_15.WAVE;
|
||||
object23.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n8nU4W);
|
||||
r2 = [object23];
|
||||
} else {
|
||||
object18 = {};
|
||||
binding = env0_15;
|
||||
object18.name = binding.ACCEPT;
|
||||
object18.label = intl.string(t.zf5jU5);
|
||||
items17 = [object18];
|
||||
object22 = {};
|
||||
object22.name = binding.IGNORE;
|
||||
object22.label = intl.string(t.EBN847);
|
||||
items17[1] = object22;
|
||||
r2 = items17;
|
||||
}
|
||||
object.accessibilityActions = r2;
|
||||
object.onAccessibilityAction = onAccessibilityAction_111691;
|
||||
return object;
|
||||
}
|
||||
}
|
||||
const type7 = a0.type;
|
||||
const FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
|
||||
if (type7 === FRIEND_REQUESTS_GROUPED) {
|
||||
object = {};
|
||||
object8 = {'id': 'view_friend_requests', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object8.text = intl.string(t['lMR96+']);
|
||||
object8.onPress = value10;
|
||||
object.actionButtons = [object8];
|
||||
object9 = {};
|
||||
object9.name = env0_15.ACTION;
|
||||
object9.label = intl.string(t['lMR96+']);
|
||||
object.accessibilityActions = [object9];
|
||||
object.onAccessibilityAction = value10;
|
||||
return object;
|
||||
}
|
||||
const type8 = a0.type;
|
||||
const NotificationCenterItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems;
|
||||
const GO_LIVE_PUSH = NotificationCenterItems.GO_LIVE_PUSH;
|
||||
if (type8 === GO_LIVE_PUSH) {
|
||||
object = {};
|
||||
object6 = {'id': 'join_stream', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object6.text = intl.string(t['Pqj7h+']);
|
||||
object6.onPress = a1;
|
||||
object.actionButtons = [object6];
|
||||
object7 = {};
|
||||
object7.name = env0_15.ACTION;
|
||||
object7.label = intl.string(t['Pqj7h+']);
|
||||
object.accessibilityActions = [object7];
|
||||
object.onAccessibilityAction = a1;
|
||||
return object;
|
||||
}
|
||||
const type9 = a0.type;
|
||||
INCOMING_FRIEND_REQUESTS_ACCEPTED = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS_ACCEPTED;
|
||||
if (type9 === INCOMING_FRIEND_REQUESTS_ACCEPTED) {
|
||||
object = {};
|
||||
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object4.text = intl.string(t['GuUH7/']);
|
||||
object4.onPress = value11;
|
||||
object.actionButtons = [object4];
|
||||
object5 = {};
|
||||
object5.name = env0_15.ACTION;
|
||||
object5.label = intl.string(t['GuUH7/']);
|
||||
object.accessibilityActions = [object5];
|
||||
object.onAccessibilityAction = value11;
|
||||
return object;
|
||||
}
|
||||
const type10 = a0.type;
|
||||
const DM_FRIEND_NUDGE = NotificationCenterItems.DM_FRIEND_NUDGE;
|
||||
if (type10 === DM_FRIEND_NUDGE) {
|
||||
object = {};
|
||||
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object4.text = intl.string(t['GuUH7/']);
|
||||
object4.onPress = value11;
|
||||
object.actionButtons = [object4];
|
||||
object5 = {};
|
||||
object5.name = env0_15.ACTION;
|
||||
object5.label = intl.string(t['GuUH7/']);
|
||||
object.accessibilityActions = [object5];
|
||||
object.onAccessibilityAction = value11;
|
||||
return object;
|
||||
}
|
||||
const type11 = a0.type;
|
||||
const FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.FRIEND_REQUEST_ACCEPTED;
|
||||
if (type11 === FRIEND_REQUEST_ACCEPTED) {
|
||||
object = {};
|
||||
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object4.text = intl.string(t['GuUH7/']);
|
||||
object4.onPress = value11;
|
||||
object.actionButtons = [object4];
|
||||
object5 = {};
|
||||
object5.name = env0_15.ACTION;
|
||||
object5.label = intl.string(t['GuUH7/']);
|
||||
object.accessibilityActions = [object5];
|
||||
object.onAccessibilityAction = value11;
|
||||
return object;
|
||||
}
|
||||
const type12 = a0.type;
|
||||
const GAME_FRIEND_REQUEST_ACCEPTED = NotificationCenterItems.GAME_FRIEND_REQUEST_ACCEPTED;
|
||||
if (type12 === GAME_FRIEND_REQUEST_ACCEPTED) {
|
||||
object = {};
|
||||
object4 = {'id': 'send_message', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object4.text = intl.string(t['GuUH7/']);
|
||||
object4.onPress = value11;
|
||||
object.actionButtons = [object4];
|
||||
object5 = {};
|
||||
object5.name = env0_15.ACTION;
|
||||
object5.label = intl.string(t['GuUH7/']);
|
||||
object.accessibilityActions = [object5];
|
||||
object.onAccessibilityAction = value11;
|
||||
return object;
|
||||
}
|
||||
const type13 = a0.type;
|
||||
const FRIEND_SUGGESTION_CREATED = NotificationCenterItems.FRIEND_SUGGESTION_CREATED;
|
||||
if (type13 === FRIEND_SUGGESTION_CREATED) {
|
||||
object = {};
|
||||
object2 = {'id': 'add_friend', 'text': null, 'variant': 'secondary', 'size': 'md'};
|
||||
object2.text = intl.string(t['boL/YX']);
|
||||
object2.onPress = value12;
|
||||
object.actionButtons = [object2];
|
||||
object3 = {};
|
||||
object3.name = env0_15.ACTION;
|
||||
object3.label = intl.string(t['boL/YX']);
|
||||
object.accessibilityActions = [object3];
|
||||
object.onAccessibilityAction = value12;
|
||||
return object;
|
||||
}
|
||||
const type14 = a0.type;
|
||||
const GUILD_SCHEDULED_EVENT_STARTED = NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED;
|
||||
if (type14 === GUILD_SCHEDULED_EVENT_STARTED) {
|
||||
object = {};
|
||||
string = intl.string;
|
||||
hRKdcn = t.hRKdcn;
|
||||
object.actionButtons = [{'id': 'join_event', 'text': null, 'variant': 'secondary', 'size': 'md',
|
||||
text: Reflect.apply(string, intl, [hRKdcn]), onPress: a1}];
|
||||
string = intl.string;
|
||||
hRKdcn = t.hRKdcn;
|
||||
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [hRKdcn])}];
|
||||
object.onAccessibilityAction = a1;
|
||||
return object;
|
||||
}
|
||||
const type15 = a0.type;
|
||||
const LIFECYCLE_ITEM = NotificationCenterItems.LIFECYCLE_ITEM;
|
||||
if (type15 === LIFECYCLE_ITEM) {
|
||||
item_enum = a0.item_enum;
|
||||
if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.UPDATE_PROFILE === item_enum) {
|
||||
value22 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zMRcWL);
|
||||
value23 = 'update_profile';
|
||||
r14 = value22;
|
||||
r15 = value23;
|
||||
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.FIND_FRIENDS === item_enum) {
|
||||
value20 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['vwL/4s']);
|
||||
value21 = 'find_friends';
|
||||
r14 = value20;
|
||||
r15 = value21;
|
||||
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.ADD_FRIEND === item_enum) {
|
||||
value18 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['boL/YX']);
|
||||
value19 = 'add_friend';
|
||||
r14 = value18;
|
||||
r15 = value19;
|
||||
} else if ((require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).ItemEnum.FIRST_MESSAGE !== item_enum) {
|
||||
r14 = value;
|
||||
r15 = value;
|
||||
} else {
|
||||
value16 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['GuUH7/']);
|
||||
value17 = 'send_message';
|
||||
r14 = value16;
|
||||
r15 = value17;
|
||||
}
|
||||
return value == r14 || value == r15 ? {actionButtons: []} : {actionButtons: [{id: r15, text: r14,
|
||||
variant: 'secondary', size: 'md', onPress: a1}], accessibilityActions: [{name: env0_15.ACTION, label: r14}],
|
||||
onAccessibilityAction: a1};
|
||||
}
|
||||
const type16 = a0.type;
|
||||
const RECENT_MENTION = NotificationCenterItems.RECENT_MENTION;
|
||||
if (type16 === RECENT_MENTION) {
|
||||
if (value5) {
|
||||
if (type === POLL_RESULT) {
|
||||
r15 = {actionButtons: []};
|
||||
} else {
|
||||
object = {};
|
||||
string = intl.string;
|
||||
vBq3iT = t.vBq3iT;
|
||||
object.actionButtons = [{'id': 'send_reply', 'text': null, 'variant': 'secondary', 'size': 'md',
|
||||
text: Reflect.apply(string, intl, [vBq3iT]), onPress: value14}];
|
||||
string = intl.string;
|
||||
vBq3iT = t.vBq3iT;
|
||||
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [vBq3iT])}];
|
||||
object.onAccessibilityAction = value14;
|
||||
r15 = object;
|
||||
}
|
||||
} else {
|
||||
r15 = {actionButtons: []};
|
||||
}
|
||||
r14 = r15;
|
||||
} else if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems.REPLY_MENTION) {
|
||||
if (value5) {
|
||||
if (type === POLL_RESULT) {
|
||||
r15 = {actionButtons: []};
|
||||
} else {
|
||||
object = {};
|
||||
string = intl.string;
|
||||
vBq3iT = t.vBq3iT;
|
||||
object.actionButtons = [{'id': 'send_reply', 'text': null, 'variant': 'secondary', 'size': 'md',
|
||||
text: Reflect.apply(string, intl, [vBq3iT]), onPress: value14}];
|
||||
string = intl.string;
|
||||
vBq3iT = t.vBq3iT;
|
||||
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [vBq3iT])}];
|
||||
object.onAccessibilityAction = value14;
|
||||
r15 = object;
|
||||
}
|
||||
} else {
|
||||
r15 = {actionButtons: []};
|
||||
}
|
||||
r14 = r15;
|
||||
} else if (a0.type === (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterItems.TRENDING_CONTENT) {
|
||||
object = {};
|
||||
string = intl.string;
|
||||
k0Q31F = t.k0Q31F;
|
||||
object.actionButtons = [{'id': 'read_summary', 'text': null, 'variant': 'secondary', 'size': 'md',
|
||||
text: Reflect.apply(string, intl, [k0Q31F]), onPress: value15}];
|
||||
string = intl.string;
|
||||
k0Q31F = t.k0Q31F;
|
||||
object.accessibilityActions = [{name: env0_15.ACTION, label: Reflect.apply(string, intl, [k0Q31F])}];
|
||||
object.onAccessibilityAction = value15;
|
||||
r14 = object;
|
||||
} else {
|
||||
r14 = {actionButtons: []};
|
||||
}
|
||||
return r14;
|
||||
}
|
||||
|
||||
function ForYouItemActionButtons(a0) { // fn#111692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11064, offset: 0x023acd1f, size: 211 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
const env0_0 = a0.item;
|
||||
const env0_1 = a0.rowIndex;
|
||||
const env0_2 = a0.onSoftAckItem;
|
||||
const actionButtons = a0.actionButtons;
|
||||
const actionsNode = a0.actionsNode;
|
||||
const compactMode = a0.compactMode;
|
||||
const object2 = {'item': 0, 'rowIndex': 0, 'onSoftAckItem': 0, 'actionButtons': 0, 'actionsNode': 0,
|
||||
'compactMode': 0};
|
||||
let value = null;
|
||||
silentSetPrototypeOf(object2, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object2, undefined);
|
||||
const styles = useStyles();
|
||||
let r9 = !compactMode && value != actionButtons;
|
||||
const value6 = value != actionsNode;
|
||||
if (r9) {
|
||||
var viewBindingProps = {style: styles.buttonsContainer, ...value2};
|
||||
r9 = r9 && actionButtons.map(_fun111693);
|
||||
value = <View {...viewBindingProps}>{r9}{value6 ? actionsNode : value}</View>;
|
||||
r0 = value;
|
||||
} else if (value6) {
|
||||
var viewBindingProps = {style: styles.buttonsContainer, ...value2};
|
||||
r9 = r9 && actionButtons.map(_fun111693);
|
||||
value = <View {...viewBindingProps}>{r9}{value6 ? actionsNode : value}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111668() { // fn#111668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:597, offset: 0x023ab14c, size: 61 bytes, params: 1, frame: 13
|
||||
const ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
||||
const dispatch = ComponentDispatch.dispatch;
|
||||
const TEXTAREA_FOCUS = ComponentActions.TEXTAREA_FOCUS;
|
||||
return Reflect.apply(dispatch, ComponentDispatch, [TEXTAREA_FOCUS, env0_0]);
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsU() { // fn#111670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2271, owner: IncomingFriendRequestActions.u, offset: 0x023ab6d7, size: 106 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(4504) /* metro dependency 4504: timing */;
|
||||
object2.opacity = value.withTiming(pressed.get() ? 0 : 1, {duration: 150});
|
||||
object2.pointerEvents = pressed.get() ? 'none' : 'auto';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActions_() { // fn#111671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2516, owner: IncomingFriendRequestActions._, offset: 0x023ab741, size: 274 bytes, params: 1, frame: 21
|
||||
var r11;
|
||||
var binding;
|
||||
var value4;
|
||||
let pressedBinding = pressed;
|
||||
let get = pressedBinding.get;
|
||||
const value2 = Reflect.apply(get, pressedBinding, []);
|
||||
const value3 = 1;
|
||||
if (value2) {
|
||||
r11 = value3;
|
||||
} else {
|
||||
binding = env0_1;
|
||||
value4 = binding.get();
|
||||
binding = env0_2;
|
||||
r11 = value4 / binding.get();
|
||||
}
|
||||
binding = env0_2;
|
||||
const value6 = binding.get();
|
||||
get = binding.get;
|
||||
const value7 = value6 - Reflect.apply(get, binding, []) * r11;
|
||||
const value8 = pressed.get();
|
||||
const value9 = 0;
|
||||
const r12 = value8 ? value9 : -value7 / 2;
|
||||
const object2 = {};
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
let withTiming = timingModule.withTiming;
|
||||
const items2 = [{scaleX: Reflect.apply(withTiming, timingModule, [r11])}];
|
||||
const object4 = {};
|
||||
object4.translateX = timingModule.withTiming(r12);
|
||||
items2[1] = object4;
|
||||
object2.transform = items2;
|
||||
const moduleValue3 = timingModule;
|
||||
withTiming = moduleValue3.withTiming;
|
||||
pressedBinding = pressed;
|
||||
get = pressedBinding.get;
|
||||
object2.opacity = Reflect.apply(withTiming, moduleValue3, [Reflect.apply(get, pressedBinding,
|
||||
[]) ? value3 : value9]);
|
||||
object2.pointerEvents = pressed.get() ? 'auto' : 'none';
|
||||
return object2;
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsE() { // fn#111672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:2930, owner: IncomingFriendRequestActions.E, offset: 0x023ab853, size: 74 bytes, params: 1, frame: 13
|
||||
let binding = env0_3;
|
||||
let get = binding.get;
|
||||
const items2 = [{translateX: Reflect.apply(get, binding, []) / 2}];
|
||||
binding = env0_4;
|
||||
get = binding.get;
|
||||
items2[1] = {translateY: Reflect.apply(get, binding, []) / 2};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsI() { // fn#111673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:3113, owner: IncomingFriendRequestActions.I, offset: 0x023ab89d, size: 281 bytes, params: 1, frame: 27
|
||||
let value = environment.__proto__;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withDelay = reanimatedRexportModule.withDelay;
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const withRepeat = moduleValue2.withRepeat;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const pressedBinding = pressed;
|
||||
let get = pressedBinding.get;
|
||||
const r4 = Reflect.apply(get, pressedBinding, []) ? '8deg' : '-2deg';
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
value = Reflect.apply(withTiming, timingModule, [r4, {duration: 150, easing: Reflect.apply(inOut, Easing,
|
||||
[Easing2.quad])}]);
|
||||
value = Reflect.apply(withRepeat, moduleValue2, [value, 4, true]);
|
||||
const items2 = [{rotateZ: Reflect.apply(withDelay, reanimatedRexportModule, [450, value])}];
|
||||
let binding = env0_3;
|
||||
get = binding.get;
|
||||
items2[1] = {translateX: -Reflect.apply(get, binding, []) / 2};
|
||||
binding = env0_4;
|
||||
get = binding.get;
|
||||
items2[2] = {translateY: -Reflect.apply(get, binding, []) / 2};
|
||||
return {transform: items2};
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsOnLayout({nativeEvent}) { // fn#111675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:3877, owner: IncomingFriendRequestActions.onLayout, offset: 0x023ab9d3, size: 41 bytes, params: 2, frame: 11
|
||||
const binding = env0_1;
|
||||
binding.set(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsOnLayout_111676({nativeEvent}) { // fn#111676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4237, owner: IncomingFriendRequestActions.onLayout, offset: 0x023ab9fc, size: 41 bytes, params: 2, frame: 11
|
||||
const binding = env0_2;
|
||||
binding.set(nativeEvent.layout.width);
|
||||
}
|
||||
|
||||
function IncomingFriendRequestActionsOnLayout_111677(a0) { // fn#111677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:4524, owner: IncomingFriendRequestActions.onLayout, offset: 0x023aba25, size: 72 bytes, params: 2, frame: 13
|
||||
let binding = env0_3;
|
||||
binding.set(a0.nativeEvent.layout.width);
|
||||
binding = env0_4;
|
||||
binding.set(a0.nativeEvent.layout.height);
|
||||
}
|
||||
|
||||
function _fun111679() { // fn#111679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5091, offset: 0x023ac7cb, size: 47 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return ChannelStore.getChannel(env0_0.message?.channel_id);
|
||||
}
|
||||
|
||||
function _fun111680() { // fn#111680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5282, offset: 0x023ac7fa, size: 185 bytes, params: 1, frame: 18
|
||||
var payload;
|
||||
let value = environment.__proto__;
|
||||
(require(14478) /* metro dependency 14478: AddFriendsScreenUtils */).sendWave(env0_6, false, 'You Tab');
|
||||
const dMFromUserId = ChannelStore.getDMFromUserId(env0_6);
|
||||
if (dMFromUserId != null) {
|
||||
value = importDefault(4093) /* metro dependency 4093: parseURL */;
|
||||
payload = value('https://discord.com/channels/@me/' + dMFromUserId).payload;
|
||||
value = importDefault(4254) /* metro dependency 4254: handleSupportedURL */;
|
||||
value({'payload': null, 'safe': true, 'navigationReplace': false, payload: payload});
|
||||
}
|
||||
env0_4(env0_0);
|
||||
}
|
||||
|
||||
function _fun111681() { // fn#111681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5537, offset: 0x023ac8b3, size: 129 bytes, params: 1, frame: 17
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(8800) /* metro dependency 8800: PeopleUtils */;
|
||||
const maybeConfirmFriendRequestAccept = defaultImport.maybeConfirmFriendRequestAccept;
|
||||
const object2 = {};
|
||||
object2.userId = env0_6;
|
||||
const type = env0_0.type;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
object2.applicationId = type !== INCOMING_GAME_FRIEND_REQUESTS ? value2 : env0_0.applicationId;
|
||||
object2.location = env0_7;
|
||||
object2.onConfirm = onConfirm_111682;
|
||||
Reflect.apply(maybeConfirmFriendRequestAccept, defaultImport, [object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun111683() { // fn#111683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5945, offset: 0x023ac9ef, size: 115 bytes, params: 1, frame: 17
|
||||
const value2 = undefined;
|
||||
const defaultImport = importDefault(8800) /* metro dependency 8800: PeopleUtils */;
|
||||
const cancelFriendRequest = defaultImport.cancelFriendRequest;
|
||||
const object2 = {};
|
||||
object2.userId = env0_6;
|
||||
const type = env0_0.type;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_GAME_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_GAME_FRIEND_REQUESTS;
|
||||
object2.applicationId = type !== INCOMING_GAME_FRIEND_REQUESTS ? value2 : env0_0.applicationId;
|
||||
object2.location = env0_7;
|
||||
Reflect.apply(cancelFriendRequest, defaultImport, [object2]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun111685() { // fn#111685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6243, offset: 0x023aca92, size: 64 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value = value.getDMChannel(env0_6);
|
||||
value.then(function(a0) {
|
||||
importDefault(dependencyMap[19])({'payload': null, 'safe': true, 'navigationReplace': false,
|
||||
payload: importDefault(dependencyMap[18])('https://discord.com/channels/@me/' + a0).payload});
|
||||
focusChatInput(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun111687() { // fn#111687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6443, offset: 0x023acb41, size: 157 bytes, params: 1, frame: 17
|
||||
var object2;
|
||||
(importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */).addRelationship({userId: env0_6,
|
||||
context: {location: env0_7}});
|
||||
const defaultImport2 = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport2.open;
|
||||
object2 = {key: 'NOTIF_CENTER_V2_ADD_FRIEND_TOAST'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7MAxkR']);
|
||||
Reflect.apply(open, defaultImport2, [object2]);
|
||||
}
|
||||
|
||||
function* _fun111689() { // fn#111689, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6639, offset: 0x023acbe9, size: 166 bytes, params: 1, frame: 15
|
||||
var value5;
|
||||
var value6;
|
||||
var value9;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
if (require.message_id != null && AnalyticEvents != null) {
|
||||
value5 = environment.__proto__.__proto__;
|
||||
value6 = env2_0(env2_2[25]);
|
||||
yield value6.createShallowPendingReply({messageId: require.message_id, channel: AnalyticEvents,
|
||||
shouldMention: true,
|
||||
showMentionToggle: true});
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
importDefault();
|
||||
value9 = environment.__proto__.__proto__;
|
||||
} else {
|
||||
importDefault();
|
||||
}
|
||||
env2_21(require.message_channel_id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111690() { // fn#111690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:6899, offset: 0x023acc8f, size: 37 bytes, params: 1, frame: 11
|
||||
require();
|
||||
focusChatInput(env0_0.message_channel_id);
|
||||
}
|
||||
|
||||
function useItemActionButtonPropsV2OnAccessibilityAction({nativeEvent}) { // fn#111691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:7777, owner: useItemActionButtonPropsV2.onAccessibilityAction, offset: 0x023accb4, size: 107 bytes, params: 2, frame: 10
|
||||
const actionName = nativeEvent.actionName;
|
||||
const WAVE = env1_15.WAVE;
|
||||
if (WAVE === actionName) {
|
||||
env0_9();
|
||||
} else if (env1_15.ACCEPT === actionName) {
|
||||
env0_11();
|
||||
} else if (env1_15.IGNORE === actionName) {
|
||||
env0_12();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111693(a0, a1) { // fn#111693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11254, offset: 0x023acdf2, size: 122 bytes, params: 3, frame: 19
|
||||
const value = a1;
|
||||
const id = a0.id;
|
||||
const value2 = Object.create(null);
|
||||
value2.id = 0;
|
||||
const value3 = copyDataProperties({}, a0, value2, undefined);
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<Button
|
||||
{...value3}
|
||||
{...{['onPress']: onPress_111694}}
|
||||
key={id ?? value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onConfirm_111682() { // fn#111682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:5728, offset: 0x023ac934, size: 187 bytes, params: 1, frame: 19
|
||||
var intl;
|
||||
const user = UserStore.getUser(env1_6);
|
||||
if (user != null) {
|
||||
intl = require(dependencyMap[13]).intl;
|
||||
dependencyMap(intl.formatToPlainString(require(dependencyMap[13]).t['5Uzkdp'],
|
||||
{username: '**' + (user.globalName ?? user.username) + '**'}));
|
||||
}
|
||||
let binding = env1_10;
|
||||
binding.set(true);
|
||||
binding = env1_0;
|
||||
binding.enableBadge = false;
|
||||
importAll(binding);
|
||||
}
|
||||
|
||||
function onPress_111694(a0) { // fn#111694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14983:11303, offset: 0x023ace6c, size: 192 bytes, params: 2, frame: 20
|
||||
if (env0_1.onPress != null) {
|
||||
env0_1.onPress(a0);
|
||||
}
|
||||
const onSoftAckItemBinding = onSoftAckItem;
|
||||
const itemBinding = item;
|
||||
onSoftAckItemBinding(itemBinding);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const NOTIFICATION_CENTER_ACTION = AnalyticEvents.NOTIFICATION_CENTER_ACTION;
|
||||
const NotificationCenterActionTypes = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterActionTypes;
|
||||
const ACTION_BUTTON = NotificationCenterActionTypes.ACTION_BUTTON;
|
||||
Reflect.apply(track, defaultImport, [NOTIFICATION_CENTER_ACTION, {action_type: ACTION_BUTTON,
|
||||
notification_center_id: itemBinding.id, item_type: itemBinding.type, acked: false, item_index: rowIndex,
|
||||
deeplink: itemBinding.deeplink, action_button_id: id}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/* Metro module 14788; source: modules/notification_center/native/ForYouItemImage.tsx; dependencies: [31, 27, 1422, 1867, 1878, 14789, 33, 4501, 697, 4624, 9195, 14790, 14791, 14792, 14793, 5475, 14794, 1305, 14795, 14796, 6771, 566, 5278, 8743, 8420, 14797, 4573, 2] */
|
||||
function _fun111703(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:6, offset: 0x023ad89a, size: 475 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).getGuildAcronym;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const {FRIEND_BACKGROUND, MESSAGE_BACKGROUND,
|
||||
PROFILE_BACKGROUND} = require(14789) /* metro dependency 14789: Constants */;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
let createStyles = createStylesModule.createStyles;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [_fun111704]);
|
||||
const value4 = createStylesModule;
|
||||
createStyles = value4.createStyles;
|
||||
object2 = {};
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
object2.fallbackImage = {color: WHITE};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.fallbackImageV2 = {color: INTERACTIVE_TEXT_DEFAULT};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.brandBackground = {backgroundColor: BACKGROUND_BRAND};
|
||||
object2.profileBackground = {backgroundColor: PROFILE_BACKGROUND};
|
||||
object2.friendBackground = {backgroundColor: FRIEND_BACKGROUND};
|
||||
object2.messageBackground = {backgroundColor: MESSAGE_BACKGROUND};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.guildGridBackground = {backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
const env0_10 = Reflect.apply(createStyles, value4, [object2]);
|
||||
value = value.memo(_fun111705);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouItemImage.tsx');
|
||||
exports.ForYouItemImage = value;
|
||||
}
|
||||
|
||||
function _fun111704(a0) { // fn#111704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:283, offset: 0x023ada75, size: 151 bytes, params: 2, frame: 14
|
||||
const r3 = a0 ? 32 : 48;
|
||||
const object2 = {};
|
||||
value = r3 / 2;
|
||||
object2.container = {height: r3, width: r3, borderRadius: value, marginEnd: a0 ? 8 : 12, alignItems: 'center',
|
||||
justifyContent: 'center'};
|
||||
object2.rowImage = {height: r3, width: r3, borderRadius: value};
|
||||
const object3 = {'height': 'auto', 'maxHeight': null, 'width': 'auto'};
|
||||
object3.maxHeight = value;
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object3.color = INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.guildFallbackImage = object3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun111705({item, compactMode}) { // fn#111705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:971, offset: 0x023adb0c, size: 2001 bytes, params: 2, frame: 28
|
||||
var r14;
|
||||
var r2;
|
||||
var r10;
|
||||
var r4;
|
||||
var r6;
|
||||
var type;
|
||||
var value5;
|
||||
const Icon = require(dependencyMap[17]).Icon;
|
||||
var brandBackground;
|
||||
var value11;
|
||||
var item_enum;
|
||||
const ItemEnum = require(dependencyMap[9]).ItemEnum;
|
||||
var UPDATE_PROFILE;
|
||||
var value16;
|
||||
var icon;
|
||||
const styles = useStyles(compactMode);
|
||||
const analyticsLocations = importDefault(dependencyMap[20])().analyticsLocations;
|
||||
const styles2 = useStyles();
|
||||
const env0_3 = item.other_user?.id;
|
||||
const user = require(dependencyMap[21]).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getUser(id);
|
||||
});
|
||||
const binding = env0_3;
|
||||
const useMemo = binding.useMemo;
|
||||
object = [user, compactMode];
|
||||
object[2] = item.acked;
|
||||
object[3] = item.guild_id;
|
||||
object[4] = item.message_id;
|
||||
object[5] = analyticsLocations;
|
||||
const value4 = Reflect.apply(useMemo, binding, [_fun111707, object]);
|
||||
if (item.icon_name != null) {
|
||||
icon = <Icon source={importDefault(item.icon_name === 'icHighlight' ? dependencyMap[13] : dependencyMap[14])} color={styles2.fallbackImage.color} />;
|
||||
brandBackground = styles2.brandBackground;
|
||||
r4 = icon;
|
||||
r6 = brandBackground;
|
||||
} else if (item.icon_url != null) {
|
||||
if (value4 != null) {
|
||||
r4 = value4;
|
||||
r6 = null;
|
||||
} else {
|
||||
value16 = ((Component) => <Component style={styles.rowImage} source={{uri: item.icon_url}} resizeMode="contain" />)(importDefault(dependencyMap[15]));
|
||||
brandBackground = styles2.brandBackground;
|
||||
r4 = value16;
|
||||
r6 = brandBackground;
|
||||
}
|
||||
} else if (value4 != null) {
|
||||
r4 = value4;
|
||||
r6 = null;
|
||||
} else {
|
||||
type = item.type;
|
||||
if (type === 'lifecycle_item') {
|
||||
item_enum = item.item_enum;
|
||||
UPDATE_PROFILE = ItemEnum.UPDATE_PROFILE;
|
||||
r10 = item_enum === UPDATE_PROFILE ? ((Component) => <Component source={importDefault(dependencyMap[16])} />)(importDefault(dependencyMap[15])) : item_enum === require(dependencyMap[9]).ItemEnum.FIND_FRIENDS || item_enum === require(dependencyMap[9]).ItemEnum.ADD_FRIEND ? <Icon source={importDefault(dependencyMap[18])} size={require(dependencyMap[17]).IconSizes.SMALL_20} color={importDefault(dependencyMap[8]).unsafe_rawColors.WHITE} /> : item_enum === require(dependencyMap[9]).ItemEnum.FIRST_MESSAGE ? ((Component) => <Component source={importDefault(dependencyMap[19])} style={{width: '105%'}} />)(importDefault(dependencyMap[15])) : <Icon source={importDefault(dependencyMap[14])} />;
|
||||
item_enum = item.item_enum;
|
||||
UPDATE_PROFILE = ItemEnum.UPDATE_PROFILE;
|
||||
r2 = (item_enum === UPDATE_PROFILE ? styles2.profileBackground : item_enum === require(dependencyMap[9]).ItemEnum.FIND_FRIENDS || item_enum === require(dependencyMap[9]).ItemEnum.ADD_FRIEND ? styles2.friendBackground : item_enum === require(dependencyMap[9]).ItemEnum.FIRST_MESSAGE ? styles2.messageBackground : styles2.brandBackground) ?? null;
|
||||
r4 = r10;
|
||||
r6 = r2;
|
||||
} else {
|
||||
type = item.type;
|
||||
if (type === require(dependencyMap[9]).NotificationCenterItems.REFERRAL_PROGRAM_ENTRYPOINT_REMINDER) {
|
||||
value11 = ((Component) => <Component source={importDefault(dependencyMap[25])} style={styles.rowImage} resizeMode="contain" />)(importDefault(dependencyMap[15]));
|
||||
brandBackground = styles2.brandBackground;
|
||||
r4 = value11;
|
||||
r6 = brandBackground;
|
||||
} else {
|
||||
value5 = GuildStore.getGuild(item.guild_id);
|
||||
r14 = value5 != null ? getGuildAcronym(value5) : null;
|
||||
type = item.type;
|
||||
if (require(dependencyMap[9]).NotificationCenterItems.MISSED_MESSAGES === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[10]);
|
||||
object.color = styles2.fallbackImage.color;
|
||||
r2 = object;
|
||||
} else if (require(dependencyMap[9]).NotificationCenterItems.FRIEND_REQUEST_REMINDER === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[11]);
|
||||
object.color = styles2.fallbackImage.color;
|
||||
r2 = object;
|
||||
} else if (require(dependencyMap[9]).NotificationCenterItems.GUILD_SCHEDULED_EVENT_STARTED === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[12]);
|
||||
object.color = styles2.fallbackImageV2.color;
|
||||
object.backgroundStyle = styles2.guildGridBackground;
|
||||
r2 = object;
|
||||
} else if (require(dependencyMap[9]).NotificationCenterItems.TOP_MESSAGES === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[12]);
|
||||
object.color = styles2.fallbackImageV2.color;
|
||||
object.backgroundStyle = styles2.guildGridBackground;
|
||||
r2 = object;
|
||||
} else if (require(dependencyMap[9]).NotificationCenterItems.MISSED_MESSAGES === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[12]);
|
||||
object.color = styles2.fallbackImageV2.color;
|
||||
object.backgroundStyle = styles2.guildGridBackground;
|
||||
r2 = object;
|
||||
} else if (require(dependencyMap[9]).NotificationCenterItems.TOP_MESSAGES === type) {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[13]);
|
||||
object.color = styles2.fallbackImage.color;
|
||||
r2 = object;
|
||||
} else {
|
||||
object = {};
|
||||
object.icon = importDefault(dependencyMap[14]);
|
||||
object.color = styles2.fallbackImage.color;
|
||||
r2 = object;
|
||||
}
|
||||
if (r2.icon !== importDefault(dependencyMap[12])) {
|
||||
r10 = <Icon source={r2.icon} color={r2.color} />;
|
||||
} else if (r14 != null) {
|
||||
const Text = require(dependencyMap[26]).Text;
|
||||
r10 = <Text variant={r14.length > 4 ? 'text-md/normal' : 'text-lg/normal'} style={[styles.rowImage,
|
||||
styles.guildFallbackImage]}>{r14}</Text>;
|
||||
} else {
|
||||
r10 = <Icon source={r2.icon} color={r2.color} />;
|
||||
}
|
||||
r2 = r2.backgroundStyle ?? styles2.brandBackground;
|
||||
r4 = r10;
|
||||
r6 = r2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
<View style={[styles.container, r6]}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun111707() { // fn#111707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:1163, offset: 0x023ae2f8, size: 220 bytes, params: 1, frame: 26
|
||||
var environment;
|
||||
var r0;
|
||||
var value3;
|
||||
var PressableOpacity;
|
||||
var object3;
|
||||
var Avatar;
|
||||
var object4;
|
||||
var moduleValue;
|
||||
var getAvatarSource;
|
||||
var itemBinding;
|
||||
var compactModeBinding;
|
||||
var AvatarSizes;
|
||||
let userBinding = user;
|
||||
const value2 = null;
|
||||
if (value2 == userBinding) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value3 = environment.__proto__;
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
object3 = {onPress: onPress_111708};
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
object4 = {};
|
||||
moduleValue = require(8420) /* metro dependency 8420: ProfileCustomizationUtils */;
|
||||
getAvatarSource = moduleValue.getAvatarSource;
|
||||
userBinding = user;
|
||||
itemBinding = item;
|
||||
object4.source = Reflect.apply(getAvatarSource, moduleValue, [userBinding, itemBinding.guild_id, undefined,
|
||||
itemBinding.acked]);
|
||||
compactModeBinding = compactMode;
|
||||
AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
object4.size = compactModeBinding ? AvatarSizes.REFRESH_MEDIUM_32 : AvatarSizes.LARGE_48;
|
||||
object4.avatarDecoration = user.avatarDecoration;
|
||||
r0 = <PressableOpacity {...object3}><Avatar {...object4} /></PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function onPress_111708() { // fn#111708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14985:1217, offset: 0x023ae3d4, size: 82 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id, localUser: user,
|
||||
messageId: item.message_id, sourceAnalyticsLocations: analyticsLocations});
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,40 @@
|
||||
/* Metro module 14810; source: modules/notification_center/native/ForYouLoadMore.tsx; dependencies: [31, 27, 4623, 33, 4501, 632, 4578, 1244, 2] */
|
||||
function _fun111770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15007:6, offset: 0x023b1696, size: 227 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const value = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value.ActivityIndicator;
|
||||
const env0_3 = value.View;
|
||||
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'alignItems': 'center',
|
||||
'flexDirection': 'row', 'justifyContent': 'center', 'marginTop': 8, 'marginBottom': 24, 'marginHorizontal': 16,
|
||||
'height': 42}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouLoadMore.tsx');
|
||||
exports.ForYouLoadMore = ForYouLoadMore;
|
||||
}
|
||||
|
||||
function ForYouLoadMore({onPressLoad}) { // fn#111771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15007:433, offset: 0x023b1779, size: 228 bytes, params: 2, frame: 23
|
||||
var r4;
|
||||
var Button;
|
||||
var intl;
|
||||
const styles = useStyles();
|
||||
if ((require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([NotificationCenterItemsStore],
|
||||
function() {
|
||||
return NotificationCenterItemsStore.loading;
|
||||
})) {
|
||||
r4 = <ActivityIndicator />;
|
||||
} else {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r4 = <Button variant="secondary" grow size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Q/LSXp'])} onPress={onPressLoad} />;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{r4}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/* Metro module 14780; source: modules/notification_center/native/ForYouMentionPlaceholder.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 566, 4017, 4504, 2] */
|
||||
function _fun111623(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:6, offset: 0x023a839d, size: 465 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {placeholder: {'flexDirection': 'row', 'marginBottom': 16, 'marginHorizontal': 24}};
|
||||
let BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object2.placeholderImage = {'backgroundColor': null, 'height': 52, 'width': 52, 'borderRadius': 26, 'marginEnd': 12,
|
||||
backgroundColor: BACKGROUND_MOD_STRONG};
|
||||
const object5 = {'backgroundColor': null, 'height': 15, 'borderRadius': null, 'marginRight': 12, 'marginBottom': 4};
|
||||
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object5.backgroundColor = BACKGROUND_MOD_STRONG;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.placeholderText = object5;
|
||||
object2.placeholderTextContainer = {'flexDirection': 'row', 'flexWrap': 'wrap'};
|
||||
const object6 = {};
|
||||
BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object6.backgroundColor = BACKGROUND_MOD_STRONG;
|
||||
object6.height = 40;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object6.marginTop = 4;
|
||||
object2.placeholderBody = object6;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [object2]);
|
||||
const env0_8 = [70, 50];
|
||||
object2 = {code: 'function ForYouMentionPlaceholderTsx1(){const{reducedMotion,opacity}=this.__closure;return{opacity:reducedMotion?0.7:opacity.get()};}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouMentionPlaceholder.tsx');
|
||||
exports.ForYouMentionPlaceholder = ForYouMentionPlaceholder;
|
||||
}
|
||||
|
||||
function ForYouMentionPlaceholder() { // fn#111624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:978, offset: 0x023a856e, size: 522 bytes, params: 1, frame: 28
|
||||
const styles = useStyles();
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
|
||||
const set = value2.set;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const withRepeat = reanimatedRexportModule.withRepeat;
|
||||
const timingModule = require(4504) /* metro dependency 4504: timing */;
|
||||
const withTiming = timingModule.withTiming;
|
||||
const Easing = reanimatedRexportModule.Easing;
|
||||
const inOut = Easing.inOut;
|
||||
const Easing2 = reanimatedRexportModule.Easing;
|
||||
Reflect.apply(set, value2, [Reflect.apply(withRepeat, reanimatedRexportModule, [Reflect.apply(withTiming,
|
||||
timingModule, [0.7, {duration: 1000, easing: Reflect.apply(inOut, Easing, [Easing2.ease])}]), -1, true])]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
const useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
const closure = ForYouMentionPlaceholderY;
|
||||
closure.__closure = {reducedMotion: useReducedMotion, opacity: value2};
|
||||
closure.__workletHash = 8828208724188;
|
||||
closure.__initData = env0_9;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
return (
|
||||
<View2 style={[styles.placeholder, value4]}>
|
||||
<View style={styles.placeholderImage} />
|
||||
<View>
|
||||
<View style={styles.placeholderTextContainer}>
|
||||
{env0_8.map(_fun111627)}
|
||||
</View>
|
||||
<View style={[styles.placeholderBody, {width: '85%'}]} />
|
||||
</View>
|
||||
</View2>
|
||||
);
|
||||
}
|
||||
|
||||
function ForYouMentionPlaceholderY() { // fn#111626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:1238, owner: ForYouMentionPlaceholder.y, offset: 0x023a8778, size: 41 bytes, params: 1, frame: 11
|
||||
return {opacity: useReducedMotion ? 0.7 : env0_2.get()};
|
||||
}
|
||||
|
||||
function _fun111627(a0, a1) { // fn#111627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14977:1525, offset: 0x023a87a1, size: 92 bytes, params: 3, frame: 19
|
||||
return <View style={[styles.placeholderText, {width: '' + a0 + '%'}]} key={a1} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Metro module 14798; source: modules/notification_center/native/ForYouReadSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
|
||||
function _fun111718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14995:6, offset: 0x023ae6dc, size: 287 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_2 = value.View;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
object4.borderTopWidth = StyleSheet.hairlineWidth;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object4.borderTopColor = BORDER_SUBTLE;
|
||||
object4.marginVertical = 8;
|
||||
object4.paddingHorizontal = 24;
|
||||
object3.container = object4;
|
||||
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
||||
object3.textHeader = {color: TEXT_SUBTLE, marginTop: 20};
|
||||
const env0_4 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouReadSectionHeader.tsx');
|
||||
exports.ForYouReadSectionHeader = ForYouReadSectionHeader;
|
||||
}
|
||||
|
||||
function ForYouReadSectionHeader() { // fn#111719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14995:484, offset: 0x023ae7fb, size: 150 bytes, params: 1, frame: 20
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.textHeader} variant="text-sm/semibold">
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hftC1K)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 14799; source: modules/notification_center/native/ForYouRecentActivitySectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
|
||||
function _fun111720(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14996:6, offset: 0x023ae891, size: 292 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.marginTop = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object4.marginBottom = PX_8;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object4.paddingHorizontal = PX_24;
|
||||
object3.container = object4;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.textHeader = {marginTop: PX_8};
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouRecentActivitySectionHeader.tsx');
|
||||
exports.ForYouRecentActivitySectionHeader = ForYouRecentActivitySectionHeader;
|
||||
}
|
||||
|
||||
function ForYouRecentActivitySectionHeader() { // fn#111721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14996:454, offset: 0x023ae9b5, size: 152 bytes, params: 1, frame: 20
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text
|
||||
style={styles.textHeader}
|
||||
color="text-muted"
|
||||
variant="text-sm/semibold"
|
||||
accessibilityRole="header"
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yM9Krm)}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* Metro module 14808; source: modules/notification_center/native/ForYouShowAllRow.tsx; dependencies: [31, 27, 661, 12016, 33, 4501, 10981, 697, 477, 1484, 683, 1305, 4584, 14803, 5278, 14804, 12808, 4573, 1244, 6245, 2] */
|
||||
function _fun111761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:6, offset: 0x023b0c3c, size: 270 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_6 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).Sections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.Fragment;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun111763);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouShowAllRow.tsx');
|
||||
exports.ForYouSuggestedFriendShowAllRow = ForYouSuggestedFriendShowAllRow;
|
||||
}
|
||||
|
||||
function ForYouShowAllRow({children, count, onPress, panelVariant}) { // fn#111762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:901, offset: 0x023b0d4a, size: 736 bytes, params: 2, frame: 40
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
const value2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
|
||||
const styles = useStyles(value2);
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(value2);
|
||||
const value4 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const channelPressableWrapperModule = require(14803) /* metro dependency 14803: ChannelPressableWrapper */;
|
||||
const renderChannelPressableWrapper = channelPressableWrapperModule.renderChannelPressableWrapper;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const backgroundColor = styles.rowActive.backgroundColor;
|
||||
const items3 = [styles.pressable];
|
||||
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
|
||||
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
|
||||
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const AvatarDuoPile = (require(12808) /* metro dependency 12808: AvatarDuoPileNative */).AvatarDuoPile;
|
||||
const isLayoutCompact2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCompact(value2);
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const items2 = [<View style={styles.avatar}><AvatarDuoPile size={isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL} {...{['aria-label']: ''}}>{children}</AvatarDuoPile></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const variant = layoutStyles.channelName.text.variant;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const NrzztX = (require(1244) /* metro dependency 1244: indexNative */).t.NrzztX;
|
||||
items2[1] = <View style={styles.textContainer}><Text lineClamp={1} variant={variant} color="text-brand" style={styles.nameText}>{Reflect.apply(format,
|
||||
intl, [NrzztX, {count: count}])}</Text></View>;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {style: styles.icon, color: styles.iconColor.color,
|
||||
source: importDefault(6245) /* metro dependency 6245 */};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const CUSTOM = IconSizes.CUSTOM;
|
||||
iconProps.size = CUSTOM;
|
||||
items2[2] = <Icon {...iconProps} />;
|
||||
let value = <>{items2}</>;
|
||||
value = <PressableHighlight accessibilityRole="button" underlayColor={backgroundColor} onPress={onPress} style={items3}>{Reflect.apply(renderChannelWrapper,
|
||||
channelWrapperModule, [value, {layout: value2, fontScale: value4,
|
||||
panelVariant: panelVariant}])}</PressableHighlight>;
|
||||
return Reflect.apply(renderChannelPressableWrapper, channelPressableWrapperModule, [value, {layout: value2,
|
||||
panelVariant: panelVariant}]);
|
||||
}
|
||||
|
||||
function _fun111763(a0) { // fn#111763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:229, offset: 0x023b102a, size: 392 bytes, params: 2, frame: 22
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(a0);
|
||||
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
const sizeStyle = channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
|
||||
const object2 = {};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object2.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
|
||||
object2.pressable = {flex: 1};
|
||||
const value3 = 2;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
|
||||
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
|
||||
const object3 = {flexShrink: 1};
|
||||
object3.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
|
||||
object2.nameText = object3;
|
||||
const object4 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'flexShrink': 0, 'flexGrow': 0};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
copyDataProperties(object4, sizeStyle, importDefault);
|
||||
object4['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
|
||||
object2.avatar = object4;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object2.icon = {'width': 8, 'height': 32, paddingRight: PX_24};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object2.iconColor = {color: INTERACTIVE_TEXT_DEFAULT};
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ForYouSuggestedFriendShowAllRow({suggestedFriends, panelVariant}) { // fn#111764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2020, offset: 0x023b11b2, size: 205 bytes, params: 2, frame: 19
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value3 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
return (
|
||||
<ForYouShowAllRow
|
||||
children={binding.useMemo(_fun111766, [value3, suggestedFriends])}
|
||||
count={suggestedFriends.length}
|
||||
onPress={Reflect.apply(useCallback, binding, [_fun111765, [value2, suggestedFriends]])}
|
||||
panelVariant={panelVariant}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun111765() { // fn#111765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2182, offset: 0x023b127f, size: 149 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const FRIEND_FINDER_SECTION_EXPANDED = AnalyticEvents.FRIEND_FINDER_SECTION_EXPANDED;
|
||||
const FRIEND_SUGGESTIONS = Sections.FRIEND_SUGGESTIONS;
|
||||
Reflect.apply(track, defaultImport, [FRIEND_FINDER_SECTION_EXPANDED, {section_id: FRIEND_SUGGESTIONS,
|
||||
truncated_count: 2, expanded_count: suggestedFriends.length, location: 'NotificationsTab'}]);
|
||||
env0_1.navigate('friends', {screen: 'suggested-friends', params: {presentation: 'card'}});
|
||||
}
|
||||
|
||||
function _fun111766() { // fn#111766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2442, offset: 0x023b1314, size: 45 bytes, params: 1, frame: 13
|
||||
return suggestedFriends.slice(2, 4).map(_fun111767);
|
||||
}
|
||||
|
||||
function _fun111767(a0) { // fn#111767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15005:2464, offset: 0x023b1341, size: 146 bytes, params: 2, frame: 20
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const object2 = {};
|
||||
let user = a0.user;
|
||||
object2.user = user;
|
||||
object2.guildId = undefined;
|
||||
const isLayoutCompact2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).isLayoutCompact(env1_2);
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
object2.size = isLayoutCompact2 ? AvatarSizes.XSMALL_20 : AvatarSizes.SMALL;
|
||||
user = a0.user;
|
||||
return <Avatar {...object2} key={user.id} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
/* Metro module 14802; source: modules/notification_center/native/ForYouSuggestedFriendRow.tsx; dependencies: [31, 27, 4502, 3793, 661, 33, 4501, 10981, 697, 477, 6771, 4584, 632, 8743, 1962, 3995, 14477, 1244, 4017, 14803, 5278, 14804, 1305, 4573, 14805, 14806, 683, 2] */
|
||||
function _fun111726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:6, offset: 0x023aecee, size: 279 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 env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.AnalyticEvents;
|
||||
const env0_8 = value.RelationshipTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = value.Fragment;
|
||||
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun111727);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouSuggestedFriendRow.tsx');
|
||||
exports.default = ForYouSuggestedFriendRow;
|
||||
}
|
||||
|
||||
function _fun111727(a0) { // fn#111727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:256, offset: 0x023aee05, size: 318 bytes, params: 2, frame: 22
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(a0);
|
||||
const channelListLayoutModule = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
const sizeStyle = channelListLayoutModule.makeSizeStyle(layoutStyles.icon.wrapper.size);
|
||||
const object2 = {};
|
||||
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
||||
object2.rowActive = {backgroundColor: BACKGROUND_MOD_MUTED};
|
||||
object2.pressable = {flex: 1};
|
||||
const value3 = 2;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.textContainer = {'flexDirection': 'column', 'flexGrow': 2, 'flexShrink': 2, 'alignSelf': 'center',
|
||||
'overflow': 'hidden', 'marginTop': -2, marginRight: PX_8};
|
||||
const object3 = {flexShrink: 1};
|
||||
object3.marginBottom = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? value3 : 0;
|
||||
object2.nameText = object3;
|
||||
const object4 = {'position': 'relative', 'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center',
|
||||
'flexShrink': 0, 'flexGrow': 0};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
copyDataProperties(object4, sizeStyle, importDefault);
|
||||
object4['marginRight'] = layoutStyles.icon.margin.marginRight + 4;
|
||||
object2.avatar = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function ForYouSuggestedFriendRow({suggestedFriend, onAddSuggestion, onAddSuggestionAnimationFinish, panelVariant}) { // fn#111728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:920, offset: 0x023aef43, size: 1437 bytes, params: 2, frame: 46
|
||||
var r3;
|
||||
var r21;
|
||||
var defaultImport;
|
||||
var defaultImport2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
const value2 = (require(10981) /* metro dependency 10981: ChannelListLayout */).useMessagesTabLayout(panelVariant);
|
||||
const styles = useStyles(value2);
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const env0_3 = analyticsLocations;
|
||||
const layoutStyles = (require(10981) /* metro dependency 10981: ChannelListLayout */).getLayoutStyles(value2);
|
||||
const value4 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
|
||||
const value5 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const value6 = env0_3.useCallback(_fun111730, [suggestedFriend, analyticsLocations]);
|
||||
if (suggestedFriend.friendSuggestionName == null) {
|
||||
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r3 = defaultImport.getName(suggestedFriend.user);
|
||||
} else if (suggestedFriend.friendSuggestionName.length > 0) {
|
||||
r3 = suggestedFriend.friendSuggestionName;
|
||||
} else {
|
||||
defaultImport = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r3 = defaultImport.getName(suggestedFriend.user);
|
||||
}
|
||||
const suggestedContactNameForSuggestion = (require(14477) /* metro dependency 14477: FriendSuggestionUtils */).getSuggestedContactNameForSuggestion(r3,
|
||||
suggestedFriend);
|
||||
const value9 = '';
|
||||
const r30 = suggestedContactNameForSuggestion != null ? ' · ' + suggestedContactNameForSuggestion : value9;
|
||||
if (suggestedFriend.mutualFriendsCount == null) {
|
||||
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r21 = defaultImport2.getName(suggestedFriend.user);
|
||||
} else if (suggestedFriend.mutualFriendsCount > 0) {
|
||||
r21 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.z7y34b,
|
||||
{count: suggestedFriend.mutualFriendsCount});
|
||||
} else {
|
||||
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
|
||||
r21 = defaultImport2.getName(suggestedFriend.user);
|
||||
}
|
||||
const value13 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(false);
|
||||
env0_3.useEffect(_fun111733, [value13,
|
||||
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RelationshipStore],
|
||||
function() {
|
||||
return RelationshipStore.getRelationshipType(suggestedFriend.user.id) === RelationshipTypes.PENDING_OUTGOING;
|
||||
})]);
|
||||
const channelPressableWrapperModule = require(14803) /* metro dependency 14803: ChannelPressableWrapper */;
|
||||
const renderChannelPressableWrapper = channelPressableWrapperModule.renderChannelPressableWrapper;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
const backgroundColor = styles.rowActive.backgroundColor;
|
||||
const items3 = [styles.pressable];
|
||||
items3[1] = {borderRadius: layoutStyles.container.borderRadius};
|
||||
const channelWrapperModule = require(14804) /* metro dependency 14804: ChannelWrapper */;
|
||||
const renderChannelWrapper = channelWrapperModule.renderChannelWrapper;
|
||||
const jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
let user = suggestedFriend.user;
|
||||
const avatarSize = layoutStyles.icon.avatarSize;
|
||||
const value15 = !value5;
|
||||
const items2 = [<View style={styles.avatar}><Avatar user={user} guildId={undefined} size={avatarSize} animate={value15} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let variant = layoutStyles.channelName.text.variant;
|
||||
const text = <Text lineClamp={1} variant={variant} color="text-default" style={styles.nameText}>{r3}</Text>;
|
||||
const object = {};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object.marginTop = platformUtilsModule.isAndroid() ? -2 : 0;
|
||||
const ActionStatusSubLabel = (require(14805) /* metro dependency 14805: ActionStatusSubLabel */).ActionStatusSubLabel;
|
||||
const height = layoutStyles.messagePreview.height;
|
||||
const moduleValue11 = platformUtilsModule;
|
||||
const r33 = moduleValue11.isAndroid() ? 2 : 0;
|
||||
variant = layoutStyles.messagePreview.text.variant;
|
||||
const string = intl.string;
|
||||
const Kzyxm9 = (require(1244) /* metro dependency 1244: indexNative */).t.Kzyxm9;
|
||||
items2[1] = <View style={styles.textContainer}>{text}<View style={object}><ActionStatusSubLabel lineHeight={height + r33} textVariant={variant} actioned={value13} maxFontSizeMultiplier={1.75} label={value9 + r21 + r30} actionStatus={Reflect.apply(string,
|
||||
intl, [Kzyxm9])} animate={value15} /></View></View>;
|
||||
const ContactSuggestionActions = (require(14806) /* metro dependency 14806: ContactSuggestionActions */).ContactSuggestionActions;
|
||||
user = suggestedFriend.user;
|
||||
let value = require(10981) /* metro dependency 10981: ChannelListLayout */;
|
||||
value = value.isLayoutCozy(value2);
|
||||
items2[2] = <ContactSuggestionActions user={user} added={value13} size={value ? 'md' : 'sm'} onAddSuggestion={function(a0) {
|
||||
var defaultImport = importDefault(dependencyMap[26]);
|
||||
var FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
|
||||
var suggestedFriendBinding = suggestedFriend;
|
||||
defaultImport.track(FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0.id,
|
||||
suggestion_source: suggestedFriendBinding.source, location: 'Notifications Tab'});
|
||||
onAddSuggestion(suggestedFriendBinding);
|
||||
}} onFinishAnimation={function() {
|
||||
onAddSuggestionAnimationFinish(suggestedFriend);
|
||||
}} animate={value15} />;
|
||||
value = <>{items2}</>;
|
||||
value = <PressableHighlight accessibilityRole="button" underlayColor={backgroundColor} onPress={value6} style={items3}>{Reflect.apply(renderChannelWrapper,
|
||||
channelWrapperModule, [value, {layout: value2, fontScale: value4,
|
||||
panelVariant: panelVariant}])}</PressableHighlight>;
|
||||
return Reflect.apply(renderChannelPressableWrapper, channelPressableWrapperModule, [value, {layout: value2,
|
||||
panelVariant: panelVariant}]);
|
||||
}
|
||||
|
||||
function _fun111730() { // fn#111730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:1259, offset: 0x023af4e0, size: 64 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(dependencyMap[14]);
|
||||
value = value(dependencyMap[13], dependencyMap.paths);
|
||||
value.then(function({default: property}) {
|
||||
var suggestedFriendBinding = suggestedFriend;
|
||||
return property({userId: suggestedFriendBinding.user.id, localUser: suggestedFriendBinding.user,
|
||||
sourceAnalyticsLocations: analyticsLocations, location: 'Notifications Tab User Profile'});
|
||||
});
|
||||
}
|
||||
|
||||
function _fun111733() { // fn#111733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14999:1922, offset: 0x023af598, size: 30 bytes, params: 1, frame: 11
|
||||
if (!env0_5) {
|
||||
env0_4.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* Metro module 14801; source: modules/notification_center/native/ForYouSuggestedFriendsSectionHeader.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 1244, 2] */
|
||||
function _fun111724(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14998:6, offset: 0x023aeb1c, size: 278 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.container = {'borderTopWidth': 1, 'borderTopColor': null, 'marginTop': 12, 'marginBottom': 8,
|
||||
'paddingHorizontal': 24, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
|
||||
borderTopColor: BORDER_SUBTLE};
|
||||
object2.noDivider = {'borderTopWidth': 0, 'marginTop': 0};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.text = {marginTop: PX_16};
|
||||
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouSuggestedFriendsSectionHeader.tsx');
|
||||
exports.default = ForYouSuggestedFriendsSectionHeader;
|
||||
}
|
||||
|
||||
function ForYouSuggestedFriendsSectionHeader({showDivider}) { // fn#111725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14998:548, offset: 0x023aec32, size: 188 bytes, params: 2, frame: 21
|
||||
const styles = useStyles();
|
||||
const items2 = [styles.container];
|
||||
items2[1] = !showDivider && styles.noDivider;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={items2}>
|
||||
<Text
|
||||
style={styles.text}
|
||||
color="text-muted"
|
||||
variant="text-sm/semibold"
|
||||
>
|
||||
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1uAmCw'])}
|
||||
</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 14809; source: modules/notification_center/native/ForYouUnreadClearedState.tsx; dependencies: [31, 27, 33, 4501, 697, 1305, 11111, 4573, 1244, 2] */
|
||||
function _fun111768(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15006:6, offset: 0x023b13d3, size: 341 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value.jsx;
|
||||
const env0_5 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {container: {'marginBottom': 4, 'marginHorizontal': 24, 'alignItems': 'center', 'flexDirection': 'row'}};
|
||||
const object4 = {'width': 48, 'height': 48, 'backgroundColor': null, 'opacity': 0.16, 'borderRadius': null,
|
||||
'marginRight': 16, 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
let GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400;
|
||||
object4.backgroundColor = GREEN_400;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
object3.imageContainer = object4;
|
||||
GREEN_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_400;
|
||||
object3.icon = {'margin': 12, 'position': 'absolute', color: GREEN_400};
|
||||
object3.headerText = {marginBottom: 2};
|
||||
const env0_6 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/ForYouUnreadClearedState.tsx');
|
||||
exports.ForYouUnreadClearedState = ForYouUnreadClearedState;
|
||||
}
|
||||
|
||||
function ForYouUnreadClearedState() { // fn#111769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15006:677, offset: 0x023b1528, size: 366 bytes, params: 1, frame: 25
|
||||
const styles = useStyles();
|
||||
const items2 = [<View style={styles.imageContainer} />];
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
items2[1] = <Icon source={importDefault(11111) /* metro dependency 11111 */} style={styles.icon} color={styles.icon.color} />;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const DonStq = (require(1244) /* metro dependency 1244: indexNative */).t.DonStq;
|
||||
items2[2] = <View><Text color="mobile-text-heading-primary" variant="text-md/semibold" style={styles.headerText}>{Reflect.apply(string,
|
||||
intl,
|
||||
[DonStq])}</Text><Text color="text-default" variant="text-md/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jXFsai)}</Text></View>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 14767; source: modules/notification_center/native/NotificationCenterActionButton.tsx; dependencies: [31, 33, 8341, 8639, 4080, 14768, 1962, 1244, 2] */
|
||||
function _fun111479(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:6, offset: 0x023a3e97, size: 138 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterActionButton.tsx');
|
||||
exports.default = NotificationCenterActionButton;
|
||||
}
|
||||
|
||||
function NotificationCenterActionButton() { // fn#111480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:231, offset: 0x023a3f21, size: 146 bytes, params: 1, frame: 19
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const iconButtonProps = {'variant': 'tertiary', 'size': 'sm', icon: importDefault(8639) /* metro dependency 8639 */,
|
||||
onPress: onPress_111481};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
iconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['UKOtz+']);
|
||||
iconButtonProps.maxFontSizeMultiplier = 2;
|
||||
return <IconButton {...iconButtonProps} />;
|
||||
}
|
||||
|
||||
function NotificationCenterActionButtonOnPress() { // fn#111481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14964:352, owner: NotificationCenterActionButton.onPress, offset: 0x023a3fb3, size: 79 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[4]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[6]);
|
||||
value = value(dependencyMap[5], dependencyMap.paths);
|
||||
return Reflect.apply(openLazy, defaultImport, [value, 'NotificationCenterActionSheet']);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* Metro module 14768; source: modules/notification_center/native/NotificationCenterActionSheet.tsx; dependencies: [31, 5215, 661, 33, 566, 14769, 10929, 4080, 11177, 7890, 7892, 5080, 11179, 1962, 7007, 6805, 6758, 1244, 6807, 6700, 11003, 9216, 14770, 11190, 14771, 7002, 11944, 2] */
|
||||
function _fun111482(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:6, offset: 0x023a4002, size: 189 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 recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
|
||||
const env0_5 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterActionSheet.tsx');
|
||||
exports.default = _default_111483;
|
||||
}
|
||||
|
||||
function _default_111483() { // fn#111483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:183, offset: 0x023a40bf, size: 1168 bytes, params: 1, frame: 34
|
||||
var object3;
|
||||
var r9;
|
||||
const {roleFilter,
|
||||
everyoneFilter} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RecentMentionsStore],
|
||||
function() {
|
||||
return {everyoneFilter: RecentMentionsStore.everyoneFilter, roleFilter: RecentMentionsStore.roleFilter};
|
||||
});
|
||||
const binding = env0_3;
|
||||
const env0_2 = binding.useCallback(_fun111485, [everyoneFilter, roleFilter]);
|
||||
const defaultImport = importDefault(10929) /* metro dependency 10929: ForLaterExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterActionSheet'}]).enabled;
|
||||
const value3 = binding.useCallback(_fun111486, []);
|
||||
const value4 = binding.useCallback(function() {
|
||||
importDefault(dependencyMap[7]).hideActionSheet();
|
||||
require(dependencyMap[14]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS});
|
||||
}, []);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
object3 = {showGradient: true};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const HcoRu0 = (require(1244) /* metro dependency 1244: indexNative */).t.HcoRu0;
|
||||
object3.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [HcoRu0])} />;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Group = ActionSheetRow.Group;
|
||||
const ActionSheetSwitchRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetSwitchRow;
|
||||
const actionSheetSwitchRowProps = {onValueChange: onValueChange_111488, value: roleFilter,
|
||||
label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.asInft)};
|
||||
let Icon = ActionSheetRow.Icon;
|
||||
const AtIcon = (require(6700) /* metro dependency 6700: AtIcon */).AtIcon;
|
||||
actionSheetSwitchRowProps.icon = <Icon IconComponent={AtIcon} source={importDefault(11003) /* metro dependency 11003 */} />;
|
||||
const actionSheetSwitchRow = <ActionSheetSwitchRow {...actionSheetSwitchRowProps} />;
|
||||
const object2 = {onValueChange: onValueChange_111489, value: everyoneFilter};
|
||||
string = intl.string;
|
||||
const S9GLtt = (require(1244) /* metro dependency 1244: indexNative */).t.S9GLtt;
|
||||
object2.label = Reflect.apply(string, intl, [S9GLtt]);
|
||||
object2.subLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jYgZa4);
|
||||
Icon = ActionSheetRow.Icon;
|
||||
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
|
||||
object2.icon = <Icon IconComponent={BellIcon} source={importDefault(14770) /* metro dependency 14770 */} />;
|
||||
const group = <Group hasIcons>{actionSheetSwitchRow}<ActionSheetSwitchRow {...object2} /></Group>;
|
||||
Group = ActionSheetRow.Group;
|
||||
if (enabled) {
|
||||
r9 = <ActionSheetRow icon={((Icon) => <Icon IconComponent={(require(11190) /* metro dependency 11190: BookmarkIcon */).BookmarkIcon} source={importDefault(14771) /* metro dependency 14771 */} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2pAkDA'])} onPress={value3} arrow key="for-later" />;
|
||||
} else {
|
||||
r9 = null;
|
||||
}
|
||||
const ActionSheetRow3 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow3.Icon;
|
||||
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
|
||||
return (
|
||||
<ActionSheet {...object3}>
|
||||
{group}
|
||||
<Group hasIcons>
|
||||
{r9}
|
||||
<ActionSheetRow
|
||||
icon={<Icon IconComponent={SettingsIcon} source={importDefault(11944) /* metro dependency 11944 */} />}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss)}
|
||||
onPress={value4}
|
||||
arrow
|
||||
key="settings"
|
||||
/>
|
||||
</Group>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun111485(a0) { // fn#111485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:349, offset: 0x023a4570, size: 71 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(14769) /* metro dependency 14769: MentionActionCreators */;
|
||||
const setGuildFilter = value.setGuildFilter;
|
||||
const object2 = {};
|
||||
const roleFilterBinding = roleFilter;
|
||||
object2.roleFilter = roleFilterBinding;
|
||||
object2.everyoneFilter = everyoneFilter;
|
||||
copyDataProperties(object2, a0, roleFilterBinding);
|
||||
Reflect.apply(setGuildFilter, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun111486() { // fn#111486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:512, offset: 0x023a45b7, size: 192 bytes, params: 1, frame: 18
|
||||
var defaultImport3;
|
||||
var pushLazy;
|
||||
let value = environment.__proto__;
|
||||
importDefault(dependencyMap[7]).hideActionSheet();
|
||||
if (importDefault(dependencyMap[8])()) {
|
||||
defaultImport3 = importDefault(dependencyMap[11]);
|
||||
pushLazy = defaultImport3.pushLazy;
|
||||
value = require(dependencyMap[13]);
|
||||
value = value(dependencyMap[12], dependencyMap.paths);
|
||||
Reflect.apply(pushLazy, defaultImport3, [value, {}, 'for-later-modal', {presentation: 'modal'}]);
|
||||
} else {
|
||||
importDefault(dependencyMap[9])(require(dependencyMap[10]).EntitlementFeatureNames.SAVED_MESSAGES);
|
||||
}
|
||||
}
|
||||
|
||||
function _default_111483OnValueChange() { // fn#111488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:1058, owner: _default_111483.onValueChange, offset: 0x023a46c8, size: 30 bytes, params: 1, frame: 11
|
||||
return env0_2({roleFilter: !roleFilter});
|
||||
}
|
||||
|
||||
function _default_111483OnValueChange_111489() { // fn#111489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14965:1269, owner: _default_111483.onValueChange, offset: 0x023a46e6, size: 30 bytes, params: 1, frame: 11
|
||||
return env0_2({everyoneFilter: !everyoneFilter});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,844 @@
|
||||
/* Metro module 14774; source: modules/notification_center/native/NotificationCenterForYou.tsx; dependencies: [57, 31, 27, 5214, 4605, 1878, 4623, 14775, 661, 7607, 4865, 33, 4624, 1485, 4007, 3829, 1478, 3834, 14776, 566, 14778, 14480, 5072, 21, 4788, 4093, 676, 22, 683, 14777, 14779, 8742, 480, 14780, 14781, 2] */
|
||||
function _fun111509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:6, offset: 0x023a5377, size: 336 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const isHoisted = function({type}) {
|
||||
return type === require(dependencyMap[12]).NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const guildReadStateStore = importDefault(5214) /* metro dependency 5214: GuildReadStateStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
|
||||
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_12 = (require(7607) /* metro dependency 7607: MainTabsConstants */).MainTabsNavigatorScreens;
|
||||
const env0_13 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
||||
const env0_14 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterForYou.tsx');
|
||||
exports.NotificationCenterForYou = NotificationCenterForYou;
|
||||
}
|
||||
|
||||
function NotificationCenterForYou(a0) { // fn#111511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:517, offset: 0x023a54fa, size: 1699 bytes, params: 2, frame: 50
|
||||
var object2;
|
||||
var r0;
|
||||
var value;
|
||||
var Array;
|
||||
let panelVariant = a0.panelVariant;
|
||||
panelVariant = !(panelVariant === undefined) && panelVariant;
|
||||
Object.create(null).panelVariant = 0;
|
||||
value = copyDataProperties({}, a0, value, undefined);
|
||||
const env0_4 = undefined;
|
||||
const value3 = (require(1485) /* metro dependency 1485 */).useIsFocused();
|
||||
const value4 = (require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */).useCurrentNavigationRouteName();
|
||||
const NotificationCenterAckedBeforeId = (require(3829) /* metro dependency 3829: UserSettings */).NotificationCenterAckedBeforeId;
|
||||
const value5 = NotificationCenterAckedBeforeId.useSetting();
|
||||
const binding = env0_4;
|
||||
const value6 = binding.useMemo(_fun111512, [value4, value3]);
|
||||
const env0_3 = value6;
|
||||
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
|
||||
const ChannelListLayoutSetting = (require(3829) /* metro dependency 3829: UserSettings */).ChannelListLayoutSetting;
|
||||
const value7 = ChannelListLayoutSetting.useSetting();
|
||||
const ChannelListLayoutTypes = (require(3834) /* metro dependency 3834: ChannelListLayoutTypes */).ChannelListLayoutTypes;
|
||||
const COMPACT = ChannelListLayoutTypes.COMPACT;
|
||||
const {initialized, hasMore, items, loadMore, loadingMore, setReadNotifItemToAcked,
|
||||
errored} = (require(14776) /* metro dependency 14776: useNotificationCenterItemsLoader */).useNotificationCenterItemsLoader({isFocused: value3,
|
||||
navigatedAway: value6, withMentions: true, initialPageSize: binding.useMemo(_fun111513, [value7 === COMPACT,
|
||||
height])});
|
||||
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
|
||||
function() {
|
||||
return NotificationCenterStore.hasNewMentions();
|
||||
});
|
||||
const value12 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterItemsStore],
|
||||
function() {
|
||||
return NotificationCenterItemsStore.localItems;
|
||||
}, []);
|
||||
(require(14778) /* metro dependency 14778: useGetOrFetchNotificationCenterItemApplications */).useGetOrFetchNotificationCenterItemsApplications(value12);
|
||||
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, ReadStateStore],
|
||||
_fun111516);
|
||||
const totalNotificationsMentionCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildReadStateStore],
|
||||
function() {
|
||||
return GuildReadStateStore.getTotalNotificationsMentionCount(true);
|
||||
});
|
||||
let useState = binding.useState;
|
||||
const value14 = Reflect.apply(useState, binding, [value13]);
|
||||
const binding2 = env0_3;
|
||||
const value15 = binding2(value14, 2);
|
||||
const property = value15[0];
|
||||
const property2 = value15[1];
|
||||
useState = binding.useState;
|
||||
const value16 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property3 = value16[0];
|
||||
const property4 = value16[1];
|
||||
useState = binding.useState;
|
||||
const Date = global.Date;
|
||||
const value17 = binding2(Reflect.apply(useState, binding, [Date.now()]), 2);
|
||||
const property5 = value17[0];
|
||||
value17[1];
|
||||
useState = binding.useState;
|
||||
let Set = global.Set;
|
||||
const value18 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
let set = new Set();
|
||||
const value20 = binding2(Reflect.apply(useState, binding, [set instanceof Object ? set : value18]), 2);
|
||||
const property6 = value20[0];
|
||||
const env0_20 = value20[1];
|
||||
const value21 = binding.useCallback(_fun111518, [property6]);
|
||||
const value22 = binding.useCallback(_fun111519, [property6]);
|
||||
let useRef = binding.useRef;
|
||||
Set = global.Set;
|
||||
const value23 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
const env0_21 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value23]);
|
||||
useRef = binding.useRef;
|
||||
Set = global.Set;
|
||||
const value25 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set();
|
||||
const env0_22 = Reflect.apply(useRef, binding, [set instanceof Object ? set : value25]);
|
||||
const value27 = binding.useCallback(_fun111520, []);
|
||||
const value28 = binding.useCallback(_fun111521, []);
|
||||
const {setAdded, friendSuggestions} = (importDefault(14480) /* metro dependency 14480: useSuggestedFriends */)();
|
||||
const value30 = binding.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
setAdded(_fun111523);
|
||||
}, [setAdded]);
|
||||
const value31 = binding.useCallback(function(a0) {
|
||||
var env0_0 = a0;
|
||||
setAdded(_fun111525);
|
||||
}, [setAdded]);
|
||||
const value33 = binding.useMemo(_fun111527, [items, hasMore, value12, friendSuggestions, initialized, value11,
|
||||
errored, value5, property, setReadNotifItemToAcked, value28, totalNotificationsMentionCount,
|
||||
(require(5072) /* metro dependency 5072: AgeGateUtils */).useShouldAgeVerifyForAgeGate()]);
|
||||
binding.useLayoutEffect(_fun111537, [initialized, property5]);
|
||||
binding.useEffect(_fun111538, [value6, value13, property, value33, value5, property2, value28]);
|
||||
binding.useEffect(_fun111544, [value3, property4]);
|
||||
binding.useEffect(_fun111546, [value6, property4]);
|
||||
const defaultImport = importDefault(8742) /* metro dependency 8742: useTrackImpression */;
|
||||
object2 = {};
|
||||
const ImpressionTypes = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionTypes;
|
||||
const VIEW = ImpressionTypes.VIEW;
|
||||
object2.type = VIEW;
|
||||
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
||||
const NOTIFICATION_CENTER_LANDING = ImpressionNames.NOTIFICATION_CENTER_LANDING;
|
||||
object2.name = NOTIFICATION_CENTER_LANDING;
|
||||
object2.properties = {empty: value33.length === 0};
|
||||
defaultImport(object2, {disableTrack: !initialized}, [initialized]);
|
||||
if (initialized) {
|
||||
const ForYouItems = (require(14781) /* metro dependency 14781: ForYouItems */).ForYouItems;
|
||||
value = <ForYouItems items={value33} loadingMore={loadingMore} loadMore={loadMore} nestedInLaunchPad={value.nestedInLaunchPad} shouldScrollToTop={property3} isSoftAcked={value21} onSoftAckItem={value22} forceHoistItem={value27} isForceHoisted={value28} suggestedFriendAdded={value30} onAddSuggestionAnimationFinish={value31} panelVariant={panelVariant} />;
|
||||
r0 = value;
|
||||
} else {
|
||||
Array = global.Array;
|
||||
value = Array.from(global.Array(10));
|
||||
value = <View>{value.map(_fun111547)}</View>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111512() { // fn#111512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:688, offset: 0x023a5b9d, size: 78 bytes, params: 1, frame: 13
|
||||
const Object = global.Object;
|
||||
const values = Object.values;
|
||||
const value = environment.__proto__;
|
||||
return !env0_0 && env0_1 !== MainTabsNavigatorScreens.NOTIFICATIONS && Reflect.apply(values, Object,
|
||||
[MainTabsNavigatorScreens]).includes(env0_1);
|
||||
}
|
||||
|
||||
function _fun111513() { // fn#111513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:895, offset: 0x023a5beb, size: 85 bytes, params: 1, frame: 17
|
||||
const r7 = env0_5 ? 48 : 68;
|
||||
const Math = global.Math;
|
||||
const min = Math.min;
|
||||
const Math2 = global.Math;
|
||||
const max = Math2.max;
|
||||
const Math3 = global.Math;
|
||||
let value = Math3.ceil(height / r7);
|
||||
value = Reflect.apply(max, Math2, [8, value]);
|
||||
return Reflect.apply(min, Math, [50, value]);
|
||||
}
|
||||
|
||||
function _fun111516() { // fn#111516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1405, offset: 0x023a5c62, size: 58 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const value3 = null;
|
||||
return value3 == currentUser ? value3 : ReadStateStore.ackMessageId(currentUser.id,
|
||||
ReadStateTypes.NOTIFICATION_CENTER);
|
||||
}
|
||||
|
||||
function _fun111518(a0) { // fn#111518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1771, offset: 0x023a5cb4, size: 22 bytes, params: 2, frame: 11
|
||||
return env0_19.has(a0);
|
||||
}
|
||||
|
||||
function _fun111519(a0) { // fn#111519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1807, offset: 0x023a5cca, size: 99 bytes, params: 2, frame: 13
|
||||
var binding;
|
||||
var Set;
|
||||
var set;
|
||||
if (!a0.forceUnacked) {
|
||||
binding = env0_19;
|
||||
if (!binding.has(a0.id)) {
|
||||
Set = global.Set;
|
||||
binding = env0_19;
|
||||
set = new Set();
|
||||
set.add(a0.id);
|
||||
env0_20(set);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111520({id}) { // fn#111520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1947, offset: 0x023a5d2d, size: 34 bytes, params: 2, frame: 11
|
||||
env0_22.current.add(id);
|
||||
}
|
||||
|
||||
function _fun111521({id}) { // fn#111521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:1996, offset: 0x023a5d4f, size: 32 bytes, params: 2, frame: 11
|
||||
return env0_22.current.has(id);
|
||||
}
|
||||
|
||||
function _fun111522(a0) { // fn#111522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2097, offset: 0x023a5d6f, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
setAdded(_fun111523);
|
||||
}
|
||||
|
||||
function _fun111524(a0) { // fn#111524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2145, offset: 0x023a5d8f, size: 32 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
setAdded(function(a0) {
|
||||
return a0.filter(_fun111526);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun111527() { // fn#111527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2260, offset: 0x023a5deb, size: 1253 bytes, params: 1, frame: 27
|
||||
var r16;
|
||||
var environment;
|
||||
var id;
|
||||
var r4;
|
||||
var r9;
|
||||
var r7;
|
||||
var r14;
|
||||
var r2;
|
||||
var r10;
|
||||
var r6;
|
||||
var r1;
|
||||
var binding;
|
||||
var filter;
|
||||
var value4;
|
||||
var value5;
|
||||
var push;
|
||||
var NotificationCenterLocalItems;
|
||||
var FRIEND_REQUESTS_GROUPED;
|
||||
var other_user;
|
||||
var map;
|
||||
var slice;
|
||||
var Math;
|
||||
var min;
|
||||
var value11;
|
||||
var Math2;
|
||||
var max;
|
||||
var value12;
|
||||
var value13;
|
||||
var unshift;
|
||||
var HermesInternal;
|
||||
var concat;
|
||||
var value14;
|
||||
var value15;
|
||||
var kind;
|
||||
var value16;
|
||||
var value17;
|
||||
var value19;
|
||||
var items6;
|
||||
var items7;
|
||||
var value20;
|
||||
var value21;
|
||||
let value = environment;
|
||||
let length = items.length;
|
||||
const value2 = 0;
|
||||
reducibleJoin2: while (true) {
|
||||
if (length > value2) {
|
||||
itemsBinding = items;
|
||||
length = itemsBinding.length;
|
||||
id = itemsBinding[length - 1].id;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
id = undefined;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin6: while (true) {
|
||||
reducibleJoin4: while (true) {
|
||||
if (hasMore) {
|
||||
if (id != null) {
|
||||
binding = env0_12;
|
||||
filter = binding.filter;
|
||||
value4 = Reflect.apply(filter, binding, [_fun111528]);
|
||||
r4 = value4;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
break reducibleJoin4;
|
||||
}
|
||||
binding = env0_12;
|
||||
r4 = binding;
|
||||
break reducibleJoin6;
|
||||
}
|
||||
const closure = function(a0) {
|
||||
a0.sort(_fun111530);
|
||||
};
|
||||
itemsBinding = items;
|
||||
let items8 = [];
|
||||
arraySpread(items8, r4, arraySpread(items8, itemsBinding, value2, r16), r16);
|
||||
reducibleJoin8: while (true) {
|
||||
if (env0_26) {
|
||||
filter = items8.filter;
|
||||
value5 = Reflect.apply(filter, items8, [_fun111531]);
|
||||
r9 = value5;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
r9 = items8;
|
||||
break reducibleJoin8;
|
||||
}
|
||||
items8 = [];
|
||||
var env0_1;
|
||||
const items2 = [];
|
||||
const items3 = [];
|
||||
let forEach = r9.forEach;
|
||||
Reflect.apply(forEach, r9, [_fun111532]);
|
||||
closure(items8);
|
||||
closure(items2);
|
||||
closure(items3);
|
||||
const value7 = importDefault(dependencyMap[27]).partition(items8, _fun111533);
|
||||
const value8 = 2;
|
||||
const value9 = env1_3(value7, value8);
|
||||
const property = value9[value2];
|
||||
const property2 = value9[1];
|
||||
length = property.length;
|
||||
const value10 = 3;
|
||||
reducibleJoin10: while (true) {
|
||||
if (length > value10) {
|
||||
push = property2.push;
|
||||
NotificationCenterLocalItems = require(dependencyMap[12]).NotificationCenterLocalItems;
|
||||
FRIEND_REQUESTS_GROUPED = NotificationCenterLocalItems.FRIEND_REQUESTS_GROUPED;
|
||||
id = property[value2].id;
|
||||
other_user = property[value2].other_user;
|
||||
map = property.map;
|
||||
Reflect.apply(push, property2, [{'kind': 'notification-center-item', 'type': null, 'id': null,
|
||||
'local_id': 'friend_requests_grouped', 'acked': false, type: FRIEND_REQUESTS_GROUPED, id: id,
|
||||
other_user: other_user, other_users: Reflect.apply(map, property, [function(a0) {
|
||||
return a0.other_user;
|
||||
}]), forceUnacked: true}]);
|
||||
env0_1 = property2;
|
||||
r7 = property2;
|
||||
r16 = dependencyMap;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
r7 = items8;
|
||||
break reducibleJoin10;
|
||||
}
|
||||
r7.forEach(_fun111535);
|
||||
items8 = [];
|
||||
length = friendSuggestions.length;
|
||||
reducibleJoin15: while (true) {
|
||||
if (length > value2) {
|
||||
push = items8.push;
|
||||
length = r7.length;
|
||||
Reflect.apply(push, items8, [{'kind': 'suggested-friends-header', 'id': 'suggested-friends-header',
|
||||
showDivider: length > value2}]);
|
||||
length = friendSuggestions.length;
|
||||
reducibleJoin13: while (true) {
|
||||
if (length > value10) {
|
||||
r14 = value8;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
length = friendSuggestions.length;
|
||||
r14 = length;
|
||||
break reducibleJoin13;
|
||||
}
|
||||
friendSuggestionsBinding = friendSuggestions;
|
||||
slice = friendSuggestionsBinding.slice;
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
length = friendSuggestions.length;
|
||||
value11 = Reflect.apply(slice, friendSuggestionsBinding, [value2, Reflect.apply(min, Math, [length, r14])]);
|
||||
forEach = value11.forEach;
|
||||
Reflect.apply(forEach, value11, [_fun111536]);
|
||||
length = friendSuggestions.length;
|
||||
if (length > value10) {
|
||||
push = items8.push;
|
||||
Reflect.apply(push, items8, [{'kind': 'suggested-friends-show-all-row',
|
||||
'id': 'suggested-friends-show-all-row',
|
||||
suggestedFriends: friendSuggestions}]);
|
||||
break reducibleJoin15;
|
||||
}
|
||||
break reducibleJoin15;
|
||||
}
|
||||
break reducibleJoin15;
|
||||
}
|
||||
const items4 = [];
|
||||
arraySpread(items4, items3, arraySpread(items4, items2, value2, r16), r16);
|
||||
reducibleJoin19: while (true) {
|
||||
if (!initialized) {
|
||||
r10 = value2;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
if (!env0_11) {
|
||||
r10 = value2;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
Math2 = global.Math;
|
||||
max = Math2.max;
|
||||
value12 = Reflect.apply(max, Math2, [totalNotificationsMentionCount, 1]);
|
||||
value13 = Reflect.apply(min, Math, [value12, 6]);
|
||||
if (!(value2 < value13)) {
|
||||
r10 = value13;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
r2 = value2;
|
||||
reducibleLoop18: while (true) {
|
||||
unshift = items4.unshift;
|
||||
HermesInternal = global.HermesInternal;
|
||||
concat = HermesInternal.concat;
|
||||
value14 = 'mp-' + r2;
|
||||
Reflect.apply(unshift, items4, [{kind: 'mentions-placeholder', id: value14}]);
|
||||
value15 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value15 < value13) {
|
||||
r2 = value15;
|
||||
continue reducibleLoop18;
|
||||
}
|
||||
r10 = value13;
|
||||
r16 = value14;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
}
|
||||
reducibleJoin21: while (true) {
|
||||
if (errored) {
|
||||
push = items4.push;
|
||||
Reflect.apply(push, items4, [{'kind': 'load-more', 'id': 'load-more'}]);
|
||||
break reducibleJoin21;
|
||||
}
|
||||
break reducibleJoin21;
|
||||
}
|
||||
const object2 = {'kind': 'recent-activity-section-header', 'id': 'rash'};
|
||||
reducibleJoin23: while (true) {
|
||||
if (r7.length > value2) {
|
||||
unshift = r7.unshift;
|
||||
Reflect.apply(unshift, r7, [{'kind': 'hoisted-items-header', 'id': 'hoisted-items-header'}]);
|
||||
break reducibleJoin23;
|
||||
}
|
||||
break reducibleJoin23;
|
||||
}
|
||||
const items5 = [];
|
||||
length = r7.length;
|
||||
if (length > value2) {
|
||||
value = items4.splice(value2, value10);
|
||||
push = items5.push;
|
||||
items7 = [];
|
||||
arraySpread(items7, items8, arraySpread(items7, r7, value2, r16), r16);
|
||||
apply(push, items7, items5, r16);
|
||||
length = value.length;
|
||||
value20 = length > value2;
|
||||
reducibleJoin39: while (true) {
|
||||
if (value20) {
|
||||
r1 = value20;
|
||||
break reducibleJoin39;
|
||||
}
|
||||
length = items4.length;
|
||||
value21 = length > value2;
|
||||
r1 = value21;
|
||||
break reducibleJoin39;
|
||||
}
|
||||
reducibleJoin41: while (true) {
|
||||
if (r1) {
|
||||
push = items5.push;
|
||||
Reflect.apply(push, items5, [object2]);
|
||||
break reducibleJoin41;
|
||||
}
|
||||
break reducibleJoin41;
|
||||
}
|
||||
push = items5.push;
|
||||
items8 = [];
|
||||
arraySpread(items8, items4, arraySpread(items8, value, value2, r16), r16);
|
||||
apply(push, items8, items5, r16);
|
||||
} else {
|
||||
length = items2.length;
|
||||
reducibleJoin28: while (true) {
|
||||
if (length > value2) {
|
||||
length = items4.length;
|
||||
if (length > value2) {
|
||||
kind = items4[value2].kind;
|
||||
if (kind !== 'mentions-placeholder') {
|
||||
r6 = value10;
|
||||
break reducibleJoin28;
|
||||
}
|
||||
length = items2.length;
|
||||
value = r10 + length - 1;
|
||||
r6 = value;
|
||||
break reducibleJoin28;
|
||||
}
|
||||
r6 = value10;
|
||||
break reducibleJoin28;
|
||||
}
|
||||
r6 = value10;
|
||||
break reducibleJoin28;
|
||||
}
|
||||
value = items4.splice(value2, r6);
|
||||
length = items8.length;
|
||||
value16 = value2 === length;
|
||||
reducibleJoin30: while (true) {
|
||||
if (value16) {
|
||||
length = items4.length;
|
||||
value17 = length > value2;
|
||||
r1 = value17;
|
||||
break reducibleJoin30;
|
||||
}
|
||||
r1 = value16;
|
||||
break reducibleJoin30;
|
||||
}
|
||||
reducibleJoin32: while (true) {
|
||||
if (r1) {
|
||||
push = items5.push;
|
||||
Reflect.apply(push, items5, [object2]);
|
||||
value19 = true;
|
||||
r6 = value19;
|
||||
break reducibleJoin32;
|
||||
}
|
||||
r6 = false;
|
||||
break reducibleJoin32;
|
||||
}
|
||||
push = items5.push;
|
||||
items6 = [];
|
||||
arraySpread(items6, items8, arraySpread(items6, value, value2, r16), r16);
|
||||
apply(push, items6, items5, r16);
|
||||
value = !r6;
|
||||
reducibleJoin34: while (true) {
|
||||
if (r6) {
|
||||
r1 = value;
|
||||
break reducibleJoin34;
|
||||
}
|
||||
length = items4.length;
|
||||
value = length > value2;
|
||||
r1 = value;
|
||||
break reducibleJoin34;
|
||||
}
|
||||
reducibleJoin36: while (true) {
|
||||
if (r1) {
|
||||
push = items5.push;
|
||||
Reflect.apply(push, items5, [object2]);
|
||||
break reducibleJoin36;
|
||||
}
|
||||
break reducibleJoin36;
|
||||
}
|
||||
push = items5.push;
|
||||
items8 = [];
|
||||
arraySpread(items8, items4, value2, r16);
|
||||
apply(push, items8, items5, r16);
|
||||
}
|
||||
return items5;
|
||||
}
|
||||
|
||||
function _fun111537() { // fn#111537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:4859, offset: 0x023a66d9, size: 116 bytes, params: 1, frame: 16
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var track;
|
||||
var NOTIFICATION_CENTER_LOADED;
|
||||
var object2;
|
||||
if (initialized) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
track = defaultImport.track;
|
||||
NOTIFICATION_CENTER_LOADED = AnalyticEvents.NOTIFICATION_CENTER_LOADED;
|
||||
object2 = {version: 'v2', load_start_timestamp: env0_18};
|
||||
object2.tti_millis = global.Date.now() - env0_18;
|
||||
Reflect.apply(track, defaultImport, [NOTIFICATION_CENTER_LOADED, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111538() { // fn#111538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:4997, offset: 0x023a674d, size: 233 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
var binding;
|
||||
var value2;
|
||||
var value3;
|
||||
var value;
|
||||
if (env0_3) {
|
||||
binding = env0_27;
|
||||
value2 = binding.filter(function(a0) {
|
||||
return a0.kind === 'notification-center-item';
|
||||
});
|
||||
env0_22.current.clear();
|
||||
value2.forEach(_fun111540);
|
||||
binding = env0_13;
|
||||
if (binding !== env0_15) {
|
||||
env0_16(env0_13);
|
||||
value = value2.filter(_fun111541);
|
||||
value = value.map(_fun111542);
|
||||
value3 = environment.__proto__;
|
||||
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).markNotificationCenterLocalItemsAcked(value);
|
||||
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
|
||||
value.bulkMarkNotificationCenterItemsAcked(value2.filter(_fun111543));
|
||||
value = require(14779) /* metro dependency 14779: NotificationCenterStoreActions */;
|
||||
value.clearNotificationGuildMentions();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111544() { // fn#111544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5453, offset: 0x023a68d0, size: 74 bytes, params: 1, frame: 12
|
||||
if (env0_0) {
|
||||
env0_17(false);
|
||||
}
|
||||
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterTabFocused(env0_0);
|
||||
return _fun111545;
|
||||
}
|
||||
|
||||
function _fun111546() { // fn#111546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5582, offset: 0x023a6942, size: 27 bytes, params: 1, frame: 11
|
||||
if (env0_3) {
|
||||
env0_17(true);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111547(a0, a1) { // fn#111547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:6067, offset: 0x023a695d, size: 49 bytes, params: 3, frame: 15
|
||||
const ForYouMentionPlaceholder = (require(14780) /* metro dependency 14780: ForYouMentionPlaceholder */).ForYouMentionPlaceholder;
|
||||
return <ForYouMentionPlaceholder key={a1} />;
|
||||
}
|
||||
|
||||
function _fun111525(a0) { // fn#111525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2153, offset: 0x023a5daf, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.filter(_fun111526);
|
||||
}
|
||||
|
||||
function _fun111528(a0) { // fn#111528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2329, offset: 0x023a62d0, size: 69 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var value;
|
||||
const forceUnacked = a0.forceUnacked;
|
||||
if (forceUnacked) {
|
||||
r0 = forceUnacked;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a0.id, id);
|
||||
value = value > 0;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function sortBySnowflake(a0) { // fn#111529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2396, offset: 0x023a6315, size: 27 bytes, params: 2, frame: 11
|
||||
a0.sort(_fun111530);
|
||||
}
|
||||
|
||||
function _fun111531(a0) { // fn#111531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2481, offset: 0x023a6371, size: 68 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
let value = a0.kind !== 'notification-center-item';
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
||||
value = !value.shouldShowAgeGateForChannelId(a0.message_channel_id);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111532(a0) { // fn#111532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2616, offset: 0x023a63b5, size: 650 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var r3;
|
||||
var value;
|
||||
var moduleValue;
|
||||
var acked;
|
||||
var value2;
|
||||
var current;
|
||||
var has;
|
||||
var id;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var value5;
|
||||
var moduleValue2;
|
||||
var isRemoteAcked;
|
||||
var value6;
|
||||
var isRemoteAcked2;
|
||||
const LinkingTypes = (require(676) /* metro dependency 676: ConstantsIOS */).LinkingTypes;
|
||||
var value7;
|
||||
var add;
|
||||
if (a0.kind === 'notification-center-item') {
|
||||
if (a0.local_id != null) {
|
||||
acked = a0.acked;
|
||||
value = !acked;
|
||||
if (acked) {
|
||||
r1 = value;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = !NotificationCenterStore.isLocalItemAcked(a0);
|
||||
r1 = value;
|
||||
}
|
||||
r3 = r1;
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
moduleValue = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
if (moduleValue.isMentionItem(a0)) {
|
||||
if (a0.acked) {
|
||||
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
isRemoteAcked = moduleValue2.isRemoteAcked;
|
||||
value6 = environment.__proto__;
|
||||
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
|
||||
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
|
||||
} else if (a0.message_channel_id == null) {
|
||||
value5 = environment.__proto__;
|
||||
if (env1_15 == null) {
|
||||
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
isRemoteAcked = moduleValue2.isRemoteAcked;
|
||||
value6 = environment.__proto__;
|
||||
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
|
||||
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a0.id, env1_15);
|
||||
value = value > 0;
|
||||
r3 = value;
|
||||
}
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
current = env1_21.current;
|
||||
if (current.has(a0.id)) {
|
||||
value5 = environment.__proto__;
|
||||
if (env1_15 == null) {
|
||||
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
isRemoteAcked = moduleValue2.isRemoteAcked;
|
||||
value6 = environment.__proto__;
|
||||
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
|
||||
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a0.id, env1_15);
|
||||
value = value > 0;
|
||||
r3 = value;
|
||||
}
|
||||
} else {
|
||||
value3 = ReadStateStore.ackMessageId(a0.message_channel_id);
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
if (defaultImport.compare(a0.message_id, value3) <= 0) {
|
||||
setReadNotifItemToAcked(a0);
|
||||
r3 = false;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
if (env1_15 == null) {
|
||||
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
isRemoteAcked = moduleValue2.isRemoteAcked;
|
||||
value6 = environment.__proto__;
|
||||
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
|
||||
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(a0.id, env1_15);
|
||||
value = value > 0;
|
||||
r3 = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
moduleValue2 = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
isRemoteAcked = moduleValue2.isRemoteAcked;
|
||||
value6 = environment.__proto__;
|
||||
isRemoteAcked2 = Reflect.apply(isRemoteAcked, moduleValue2, [a0, env1_2]);
|
||||
r3 = a0.type !== 'go_live_push' ? !isRemoteAcked2 : a0.deeplink != null ? (importDefault(4093) /* metro dependency 4093: parseURL */)(a0.deeplink).payload.type === LinkingTypes.VOICE_CHANNEL && !isRemoteAcked2 : !isRemoteAcked2;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
value = environment.__proto__;
|
||||
setReadNotifItemToAcked(a0);
|
||||
}
|
||||
value = environment.__proto__;
|
||||
current = env1_22.current;
|
||||
has = current.has;
|
||||
id = a0.id;
|
||||
if (Reflect.apply(has, current, [id])) {
|
||||
env0_1.push(a0);
|
||||
a0.acked = false;
|
||||
} else {
|
||||
value7 = environment.__proto__.__proto__;
|
||||
if (isHoisted(a0)) {
|
||||
if (r3) {
|
||||
env0_1.push(a0);
|
||||
} else if (a0.forceUnacked) {
|
||||
env0_1.push(a0);
|
||||
} else if (r3) {
|
||||
env0_2.push(a0);
|
||||
} else {
|
||||
env0_3.push(a0);
|
||||
}
|
||||
} else if (r3) {
|
||||
env0_2.push(a0);
|
||||
} else {
|
||||
env0_3.push(a0);
|
||||
}
|
||||
}
|
||||
current = env1_21.current;
|
||||
add = current.add;
|
||||
id = a0.id;
|
||||
Reflect.apply(add, current, [id]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111533(a0) { // fn#111533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3364, offset: 0x023a663f, size: 60 bytes, params: 2, frame: 13
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__.__proto__;
|
||||
const NotificationCenterLocalItems = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const INCOMING_FRIEND_REQUESTS = NotificationCenterLocalItems.INCOMING_FRIEND_REQUESTS;
|
||||
return type === INCOMING_FRIEND_REQUESTS && a0.acked;
|
||||
}
|
||||
|
||||
function _fun111535(a0) { // fn#111535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3746, offset: 0x023a6686, size: 28 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = !env1_23(a0);
|
||||
a0.enableBadge = value;
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun111536(a0) { // fn#111536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:3965, offset: 0x023a66a2, size: 55 bytes, params: 2, frame: 13
|
||||
const binding = env0_4;
|
||||
const push = binding.push;
|
||||
const user = a0.user;
|
||||
Reflect.apply(push, binding, [{kind: 'suggested-friends-row', id: user.id, suggestedFriend: a0}]);
|
||||
}
|
||||
|
||||
function _fun111540(a0) { // fn#111540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5099, offset: 0x023a684a, size: 30 bytes, params: 2, frame: 11
|
||||
if (!isHoisted(a0)) {
|
||||
a0.enableBadge = false;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111541(a0) { // fn#111541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5167, offset: 0x023a6868, size: 41 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = a0.local_id != null;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = !NotificationCenterStore.isLocalItemAcked(a0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111543(a0) { // fn#111543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5340, offset: 0x023a689c, size: 52 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
return !value.isRemoteAcked(a0, env1_2);
|
||||
}
|
||||
|
||||
function _fun111545() { // fn#111545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:5511, offset: 0x023a691a, size: 40 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterTabFocused(false);
|
||||
}
|
||||
|
||||
function _fun111526({user}) { // fn#111526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2166, offset: 0x023a5dc7, size: 36 bytes, params: 2, frame: 2
|
||||
const id = user.id;
|
||||
user = env1_0.user;
|
||||
return id !== user.id;
|
||||
}
|
||||
|
||||
function _fun111530({id}, {id}) { // fn#111530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14971:2408, offset: 0x023a6330, size: 65 bytes, params: 3, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.compare(id, id);
|
||||
return -1 * value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
/* Metro module 14772; source: modules/notification_center/native/NotificationCenterPermissionNudge.tsx; dependencies: [57, 31, 27, 661, 1376, 11873, 33, 4501, 697, 683, 10629, 4573, 1244, 4578, 11874, 5278, 5312, 14773, 7013, 1365, 2] */
|
||||
function _fun111501(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:6, offset: 0x023a4b4f, size: 597 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = require(31) /* metro dependency 31 */;
|
||||
const env0_4 = value.useCallback;
|
||||
const env0_5 = value.useEffect;
|
||||
const env0_6 = (require(27) /* metro dependency 27 */).View;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = value.AnalyticEvents;
|
||||
const env0_8 = value.NOOP;
|
||||
const env0_9 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
|
||||
value = require(11873) /* metro dependency 11873: NotificationPermissionConstants */;
|
||||
const env0_10 = value.EventActionType;
|
||||
const env0_11 = value.EventActionLocation;
|
||||
const env0_12 = value.NotificationNudgeAnalyticsAction;
|
||||
const env0_13 = value.NotificationNudgeSurface;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_14 = value.jsx;
|
||||
const env0_15 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object5 = {'flexDirection': 'row', 'paddingLeft': 24, 'paddingRight': null, 'paddingVertical': null,
|
||||
'backgroundColor': null, 'alignItems': 'flex-start', 'borderBottomWidth': 1};
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.paddingRight = PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingVertical = PX_16;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object5.borderColor = BORDER_SUBTLE;
|
||||
object5.gap = 16;
|
||||
object3.container = object5;
|
||||
object3.contentContainer = {flex: 1};
|
||||
const object6 = {'width': 48, 'height': 48, 'borderRadius': null, 'backgroundColor': null, 'alignItems': 'center',
|
||||
'justifyContent': 'center'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
||||
object6.backgroundColor = BACKGROUND_MOD_STRONG;
|
||||
object3.iconContainer = object6;
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object3.ctaButton = {alignSelf: 'flex-start', marginTop: PX_12};
|
||||
const env0_16 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudge.tsx');
|
||||
exports.default = NotificationCenterPermissionNudge;
|
||||
}
|
||||
|
||||
function NotificationCenterBannerImpl({onDismiss}) { // fn#111502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:922, offset: 0x023a4da4, size: 740 bytes, params: 2, frame: 32
|
||||
const styles = useStyles();
|
||||
useEffect(function() {
|
||||
var defaultImport = importDefault(dependencyMap[9]);
|
||||
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
|
||||
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.IMPRESSION,
|
||||
prompt_type: NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER});
|
||||
}, []);
|
||||
const BellSlashIcon = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
|
||||
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
|
||||
const items3 = [<View style={styles.iconContainer}><BellSlashIcon size="md" color={ICON_STRONG} /></View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const G6YBna = (require(1244) /* metro dependency 1244: indexNative */).t.G6YBna;
|
||||
const items2 = [<Text variant="text-md/semibold" color="text-default">{Reflect.apply(string, intl,
|
||||
[G6YBna])}</Text>];
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
items2[1] = <Text variant="text-md/medium" color="text-muted" style={{marginTop: PX_4}}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9CoPDE'])}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
items2[2] = <View style={styles.ctaButton}><Button variant="primary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a4bgO0)} onPress={onPress_111504} /></View>;
|
||||
items3[1] = <View style={styles.contentContainer}>{items2}</View>;
|
||||
const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight;
|
||||
string = intl.string;
|
||||
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
items3[2] = <PressableHighlight onPress={function() {
|
||||
var defaultImport = importDefault(dependencyMap[9]);
|
||||
var CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
|
||||
defaultImport.track(CONTEXTUAL_REMINDER_ACTION, {action: NotificationNudgeAnalyticsAction.DISMISS,
|
||||
prompt_type: NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER});
|
||||
onDismiss();
|
||||
}} hitSlop={8} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[WAI6xu])}><XSmallIcon size="sm" color="icon-strong" /></PressableHighlight>;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items3}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NotificationCenterPermissionNudge() { // fn#111506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:2333, offset: 0x023a51b5, size: 276 bytes, params: 1, frame: 19
|
||||
const defaultImport = importDefault(14773) /* metro dependency 14773: NotificationCenterPermissionNudgeExperiment */;
|
||||
const useConfig = defaultImport.useConfig;
|
||||
const enabled = Reflect.apply(useConfig, defaultImport, [{location: 'NotificationCenterPermissionNudge'}]).enabled;
|
||||
const value2 = (require(11874) /* metro dependency 11874: NotificationPermissionUtil */).useCanSeePushNotificationNudge();
|
||||
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
|
||||
const useSelectedTimeRecurringDismissibleContent = useSelectedDismissibleContentModule.useSelectedTimeRecurringDismissibleContent;
|
||||
const value3 = null;
|
||||
let NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = enabled && value2 ? (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER : value3;
|
||||
const value5 = env0_3(Reflect.apply(useSelectedTimeRecurringDismissibleContent, useSelectedDismissibleContentModule,
|
||||
[NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER, {cooldownDurationMs: 604800000}]), 2);
|
||||
const property = value5[0];
|
||||
const value6 = useCallback(_fun111507, [value5[1]]);
|
||||
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
|
||||
NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER = DismissibleContent.NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER;
|
||||
return property !== NOTIFICATION_NUDGE_NOTIFICATION_CENTER_BANNER ? value3 : <NotificationCenterBannerImpl onDismiss={value6} />;
|
||||
}
|
||||
|
||||
function NotificationCenterBannerImplOnPress() { // fn#111504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14969:1695, owner: NotificationCenterBannerImpl.onPress, offset: 0x023a50d7, size: 132 bytes, params: 1, frame: 18
|
||||
const notificationPermissionUtilModule = require(11874) /* metro dependency 11874: NotificationPermissionUtil */;
|
||||
const requestPushNotificationPermission = notificationPermissionUtilModule.requestPushNotificationPermission;
|
||||
const ALLOW_TO_REQUEST = EventActionType.ALLOW_TO_REQUEST;
|
||||
const NOTIFICATION_CENTER = EventActionLocation.NOTIFICATION_CENTER;
|
||||
Reflect.apply(requestPushNotificationPermission, notificationPermissionUtilModule, [ALLOW_TO_REQUEST,
|
||||
NOTIFICATION_CENTER, NOOP]);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CONTEXTUAL_REMINDER_ACTION = AnalyticEvents.CONTEXTUAL_REMINDER_ACTION;
|
||||
const ACCEPT = NotificationNudgeAnalyticsAction.ACCEPT;
|
||||
const NOTIFICATION_CENTER_BANNER = NotificationNudgeSurface.NOTIFICATION_CENTER_BANNER;
|
||||
Reflect.apply(track, defaultImport, [CONTEXTUAL_REMINDER_ACTION, {action: ACCEPT,
|
||||
prompt_type: NOTIFICATION_CENTER_BANNER}]);
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/* Metro module 14773; source: modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx; dependencies: [1854, 2] */
|
||||
function _fun111508(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14970:6, offset: 0x023a52e6, size: 145 bytes, params: 8, frame: 20
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = require(1854) /* metro dependency 1854: apex */;
|
||||
value = value.createApexExperiment({'name': '2026-04-notification-center-push-banner', 'kind': 'user',
|
||||
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/native/NotificationCenterPermissionNudgeExperiment.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/* Metro module 14778; source: modules/notification_center/useGetOrFetchNotificationCenterItemApplications.tsx; dependencies: [31, 4624, 6777, 2] */
|
||||
function _fun111615(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:6, offset: 0x023a809b, size: 257 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const Set = global.Set;
|
||||
const {INCOMING_GAME_FRIEND_REQUESTS, INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED, INCOMING_FRIEND_REQUESTS,
|
||||
INCOMING_FRIEND_REQUESTS_ACCEPTED} = (require(4624) /* metro dependency 4624: NotificationCenterItemsTypes */).NotificationCenterLocalItems;
|
||||
const set = new Set([INCOMING_GAME_FRIEND_REQUESTS, INCOMING_GAME_FRIEND_REQUESTS_ACCEPTED,
|
||||
INCOMING_FRIEND_REQUESTS, INCOMING_FRIEND_REQUESTS_ACCEPTED]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useGetOrFetchNotificationCenterItemApplications.tsx');
|
||||
exports.useGetOrFetchNotificationCenterItemsApplications = useGetOrFetchNotificationCenterItemsApplications;
|
||||
}
|
||||
|
||||
function useGetOrFetchNotificationCenterItemsApplications(a0) { // fn#111616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:559, offset: 0x023a819c, size: 71 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)(env0_2.useMemo(_fun111617,
|
||||
[a0]));
|
||||
}
|
||||
|
||||
function _fun111617() { // fn#111617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:637, offset: 0x023a81e3, size: 68 bytes, params: 1, frame: 12
|
||||
const Set = global.Set;
|
||||
new Set().forEach(_fun111618);
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun111618({applicationId, type}) { // fn#111618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14975:679, offset: 0x023a8227, size: 97 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
let binding = env2_3;
|
||||
if (binding.has(type)) {
|
||||
if (!(applicationId == null || env0_0.has(applicationId))) {
|
||||
binding = env0_0;
|
||||
binding.add(applicationId);
|
||||
binding = env0_1;
|
||||
binding.push(applicationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/* Metro module 14782; source: modules/notification_center/useNotificationCenterItemAcked.tsx; dependencies: [14775, 566, 4788, 2] */
|
||||
function _fun111659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:6, offset: 0x023aacff, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useNotificationCenterItemAcked.tsx');
|
||||
exports.useNotificationCenterItemAcked = useNotificationCenterItemAcked;
|
||||
}
|
||||
|
||||
function useNotificationCenterItemAcked(a0, a1) { // fn#111660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:235, offset: 0x023aad71, size: 119 bytes, params: 3, frame: 17
|
||||
var r1;
|
||||
var r0;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
|
||||
_fun111661);
|
||||
const forceUnacked = a0.forceUnacked;
|
||||
if (forceUnacked) {
|
||||
r0 = !forceUnacked;
|
||||
} else {
|
||||
if (value2) {
|
||||
r1 = value2;
|
||||
} else {
|
||||
value = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
value = value.isRemoteAcked(a0, a1);
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun111661() { // fn#111661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14979:281, offset: 0x023aade8, size: 27 bytes, params: 1, frame: 11
|
||||
return NotificationCenterStore.isLocalItemAcked(env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/* Metro module 14776; source: modules/notification_center/useNotificationCenterItemsLoader.tsx; dependencies: [5, 57, 31, 5215, 4623, 14775, 4865, 566, 14777, 5097, 8422, 2] */
|
||||
function _fun111568(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:6, offset: 0x023a6f48, size: 260 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const recentMentionsStore = importDefault(5215) /* metro dependency 5215: RecentMentionsStore */;
|
||||
const notificationCenterItemsStore = importDefault(4623) /* metro dependency 4623: NotificationCenterItemsStore */;
|
||||
const notificationCenterStore = importDefault(14775) /* metro dependency 14775: NotificationCenterStore */;
|
||||
const env0_9 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
|
||||
const closure = useNotificationCenterItemsLoader;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useNotificationCenterItemsLoader.tsx');
|
||||
exports.PAGE_SIZE_WITH_MENTIONS = 8;
|
||||
exports.PAGE_SIZE = 20;
|
||||
exports.useNotificationCenterItemsLoader = closure;
|
||||
exports.useDesktopNotificationCenterItemsLoader = useDesktopNotificationCenterItemsLoader;
|
||||
}
|
||||
|
||||
function useNotificationCenterItemsLoader({isFocused, navigatedAway, isDesktop, withMentions, initialPageSize}) { // fn#111569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:214, offset: 0x023a704c, size: 652 bytes, params: 2, frame: 32
|
||||
withMentions = !(withMentions === undefined) && withMentions;
|
||||
const env0_4 = initialPageSize;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([NotificationCenterStore],
|
||||
function() {
|
||||
return NotificationCenterStore.shouldReload();
|
||||
});
|
||||
const binding = value2;
|
||||
const env0_6 = binding.useRef(false);
|
||||
const [property, env0_7] = env0_4(binding.useState(false), 2);
|
||||
const {initialized, loading, items, hasMore, cursor,
|
||||
errored} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([NotificationCenterItemsStore],
|
||||
function() {
|
||||
return {initialized: NotificationCenterItemsStore.initialized, loading: NotificationCenterItemsStore.loading,
|
||||
items: NotificationCenterItemsStore.items, hasMore: NotificationCenterItemsStore.hasMore,
|
||||
cursor: NotificationCenterItemsStore.cursor, errored: NotificationCenterItemsStore.errored};
|
||||
});
|
||||
const {roleFilter,
|
||||
everyoneFilter} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RecentMentionsStore],
|
||||
function() {
|
||||
return {everyoneFilter: RecentMentionsStore.everyoneFilter, roleFilter: RecentMentionsStore.roleFilter};
|
||||
});
|
||||
binding.useEffect(_fun111573, []);
|
||||
binding.useEffect(_fun111575, [isFocused, initialized]);
|
||||
binding.useEffect(function() {
|
||||
return _fun111577;
|
||||
}, [navigatedAway, items, isDesktop, (importDefault(8422) /* metro dependency 8422: useGetIsMounted */)(), errored]);
|
||||
binding.useEffect(_fun111578, [initialized, value2, isFocused, withMentions, roleFilter, everyoneFilter,
|
||||
initialPageSize]);
|
||||
const useCallback = binding.useCallback;
|
||||
let value = _fun111579();
|
||||
value = Reflect.apply(useCallback, binding, [value, [initialized, hasMore, cursor, errored, withMentions,
|
||||
roleFilter, everyoneFilter]]);
|
||||
return {initialized: initialized, loading: loading, items: items, hasMore: hasMore, loadMore: value,
|
||||
loadingMore: property, setReadNotifItemToAcked: function(a0) {
|
||||
if (!a0.acked) {
|
||||
a0.acked = true;
|
||||
}
|
||||
}, errored: errored};
|
||||
}
|
||||
|
||||
function useDesktopNotificationCenterItemsLoader() { // fn#111585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:2013, offset: 0x023a7661, size: 106 bytes, params: 1, frame: 14
|
||||
const value = useNotificationCenterItemsLoader({'isFocused': true, 'isDesktop': true});
|
||||
const initialized = value.initialized;
|
||||
const loading = value.loading;
|
||||
const items2 = value.items;
|
||||
const hasMore = value.hasMore;
|
||||
const loadMore = value.loadMore;
|
||||
const object2 = {initialized: initialized, loading: loading};
|
||||
object2.items = items2.filter(function(a0) {
|
||||
return a0.kind === 'notification-center-item';
|
||||
});
|
||||
object2.hasMore = hasMore;
|
||||
object2.loadMore = loadMore;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun111573() { // fn#111573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:798, offset: 0x023a7359, size: 49 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterActive(true);
|
||||
return _fun111574;
|
||||
}
|
||||
|
||||
function _fun111575() { // fn#111575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:906, offset: 0x023a73b2, size: 67 bytes, params: 1, frame: 12
|
||||
var moduleValue;
|
||||
if (initialized && isFocused) {
|
||||
value = environment.__proto__;
|
||||
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
|
||||
moduleValue.ackUserFeature(ReadStateTypes.NOTIFICATION_CENTER);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111576() { // fn#111576, offset: 0x023a73f5, size: 11 bytes, params: 1, frame: 1
|
||||
return _fun111577;
|
||||
}
|
||||
|
||||
function _fun111578() { // fn#111578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1151, offset: 0x023a749b, size: 132 bytes, params: 1, frame: 15
|
||||
var value3;
|
||||
var value4;
|
||||
const initializedBinding = initialized;
|
||||
if (initializedBinding ? env0_5 && isFocused : !initializedBinding) {
|
||||
value3 = environment.__proto__;
|
||||
value4 = 8;
|
||||
require(dependencyMap[value4]).fetchNotificationCenterItems({limit: initialPageSize ?? (withMentions ? value4 : 20),
|
||||
|
||||
with_mentions: withMentions, roles_filter: roleFilter, everyone_filter: everyoneFilter});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun111579() { // fn#111579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1319, offset: 0x023a751f, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun111581);
|
||||
return _fun111583;
|
||||
}
|
||||
|
||||
function _fun111574() { // fn#111574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:843, offset: 0x023a738a, size: 40 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(14777) /* metro dependency 14777: NotificationCenterItemsActions */).setNotificationCenterActive(false);
|
||||
}
|
||||
|
||||
function _fun111577() { // fn#111577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1006, offset: 0x023a7400, size: 155 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
if (isDesktop) {
|
||||
if (!env1_15() && (errored || items.length > 100)) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
|
||||
value.resetNotificationCenter();
|
||||
}
|
||||
} else if (navigatedAway && items.length > 100) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = require(14777) /* metro dependency 14777: NotificationCenterItemsActions */;
|
||||
value.resetNotificationCenter();
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun111581(a0) { // fn#111581, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14973:1339, offset: 0x023a754e, size: 232 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
var binding;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var r1 = RecentMentionsStore.current || !NotificationCenterStore;
|
||||
r1 = !r1 ? !useNotificationCenterItemsLoader : r1;
|
||||
r1 = !r1 ? env2_11 == null : r1;
|
||||
r1 = !r1 ? !a0 && env2_12 : r1;
|
||||
if (!r1) {
|
||||
RecentMentionsStore.current = true;
|
||||
NotificationCenterItemsStore(true);
|
||||
binding = env3_0;
|
||||
var value8 = 8;
|
||||
var value9 = binding(env3_2[value8]);
|
||||
var fetchNotificationCenterItems = value9.fetchNotificationCenterItems;
|
||||
binding = env2_3;
|
||||
yield Reflect.apply(fetchNotificationCenterItems, value9, [{after: env2_11, with_mentions: binding,
|
||||
roles_filter: env2_13, everyone_filter: env2_14, limit: binding ? value8 : 20}, function() {
|
||||
RecentMentionsStore.current = false;
|
||||
}]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
NotificationCenterItemsStore(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/* Metro module 14471; source: modules/notification_center/useRelativeTimestamp.tsx; dependencies: [57, 31, 4788, 672, 2] */
|
||||
function _fun109503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:6, offset: 0x0234f8ad, size: 137 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notification_center/useRelativeTimestamp.tsx');
|
||||
exports.useRelativeTimestamp = useRelativeTimestamp;
|
||||
}
|
||||
|
||||
function useRelativeTimestamp({timestamp, abbreviated}) { // fn#109504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:225, offset: 0x0234f936, size: 123 bytes, params: 2, frame: 17
|
||||
abbreviated = abbreviated === undefined || abbreviated;
|
||||
const binding = env0_4;
|
||||
const value = env0_3(binding.useState(_fun109505), 2);
|
||||
const property = value[0];
|
||||
const env0_2 = value[1];
|
||||
binding.useEffect(_fun109506, [timestamp, abbreviated]);
|
||||
return property;
|
||||
}
|
||||
|
||||
function _fun109505() { // fn#109505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:305, offset: 0x0234f9b1, size: 50 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(timestamp,
|
||||
abbreviated);
|
||||
}
|
||||
|
||||
function _fun109506() { // fn#109506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:388, offset: 0x0234f9e3, size: 251 bytes, params: 1, frame: 19
|
||||
const binding = env0_2;
|
||||
const notificationCenterUtilsModule = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
const getRelativeTimestamp = notificationCenterUtilsModule.getRelativeTimestamp;
|
||||
const timestampBinding = timestamp;
|
||||
binding(Reflect.apply(getRelativeTimestamp, notificationCenterUtilsModule, [timestampBinding, abbreviated]));
|
||||
const Date = global.Date;
|
||||
let value = Date.now() - timestampBinding;
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const DAY = Millis.DAY;
|
||||
if (value > DAY) {
|
||||
return undefined;
|
||||
}
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const r5 = value >= HOUR ? (importDefault(672) /* metro dependency 672: Durations */).Millis.HOUR : (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE;
|
||||
const setInterval = global.setInterval;
|
||||
value = r5 - value % r5;
|
||||
const env0_0 = setInterval(_fun109507, r5, value);
|
||||
return _fun109508;
|
||||
}
|
||||
|
||||
function _fun109507() { // fn#109507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14668:563, offset: 0x0234fade, size: 59 bytes, params: 1, frame: 15
|
||||
const binding = env1_2;
|
||||
const notificationCenterUtilsModule = require(4788) /* metro dependency 4788: NotificationCenterUtils */;
|
||||
const getRelativeTimestamp = notificationCenterUtilsModule.getRelativeTimestamp;
|
||||
binding(Reflect.apply(getRelativeTimestamp, notificationCenterUtilsModule, [timestamp, abbreviated]));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user