Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user