1294 lines
51 KiB
TypeScript
1294 lines
51 KiB
TypeScript
/* Metro module 5071; source: modules/threads/ActiveJoinedThreadsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 1379, 1867, 4605, 1934, 4790, 3786, 1386, 21, 5072, 5089, 694, 22, 566, 2] */
|
|
function _fun43913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#43913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:6, offset: 0x011621b8, size: 872 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_43919 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const closure = CONNECTION_OPEN_43920;
|
|
const recountChannelId = function(a0) {
|
|
var value2 = ChannelStore.getBasicChannel(a0);
|
|
if (value2 != null && THREADED_CHANNEL_TYPES.has(value2.type)) {
|
|
recountParent(value2.guild_id, value2.id);
|
|
}
|
|
};
|
|
const closure2 = function(a0) {
|
|
return updateThread(a0.channel.guild_id, a0.channel.parent_id, a0.channel.id);
|
|
};
|
|
const closure3 = THREAD_MEMBER_UPDATE_43930;
|
|
const closure4 = LOAD_MESSAGES_SUCCESS_43931;
|
|
const closure5 = WINDOW_FOCUS_43932;
|
|
const syncTimer = function(a0, a1) {
|
|
clearTimer(a0.id);
|
|
if (a1) {
|
|
_fun43936(a0);
|
|
}
|
|
};
|
|
const exists = function(a0, a1) {
|
|
return existsIn(a0, a1.guild_id, a1.parent_id, a1.id);
|
|
};
|
|
const existsIn = function(a0, a1, a2, a3) {
|
|
return a1 in a0 && a2 in a0[a1] && a3 in a0[a1][a2];
|
|
};
|
|
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 */;
|
|
let value = require(1383) /* metro dependency 1383: ChannelRecord */;
|
|
const env0_8 = value.THREADED_CHANNEL_TYPES;
|
|
const env0_9 = value.THREAD_CHANNEL_TYPES;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const activeThreadsStore = importDefault(4790) /* metro dependency 4790: ActiveThreadsStore */;
|
|
const joinedThreadsStore = importDefault(3786) /* metro dependency 3786: JoinedThreadsStore */;
|
|
const env0_16 = (require(1386) /* metro dependency 1386: ChannelConstants */).ChannelFlags;
|
|
const env0_17 = {};
|
|
const env0_18 = {};
|
|
const env0_19 = {};
|
|
const env0_20 = {};
|
|
const env0_21 = {};
|
|
const env0_22 = {};
|
|
const env0_24 = {};
|
|
const env0_26 = {};
|
|
const env0_27 = {};
|
|
const env0_28 = {};
|
|
const env0_29 = {};
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun43943(Store).displayName = 'ActiveJoinedThreadsStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: closure,
|
|
OVERLAY_INITIALIZE: closure, THREAD_LIST_SYNC: function({guildId}) {
|
|
rebuildGuild(guildId);
|
|
}, LOAD_THREADS_SUCCESS: closure, LOAD_ARCHIVED_THREADS_SUCCESS: closure, SEARCH_MESSAGES_SUCCESS: closure,
|
|
MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure, GUILD_CREATE: function({guild}) {
|
|
rebuildGuild(guild.id);
|
|
}, GUILD_DELETE: closure, CURRENT_USER_UPDATE: closure, THREAD_CREATE: closure2, THREAD_UPDATE: closure2,
|
|
THREAD_DELETE: closure2, CHANNEL_UPDATES: function({channels}) {
|
|
var moduleValue;
|
|
var isChannelContentGated;
|
|
var anyThreadsNSFWBinding;
|
|
var guild_id;
|
|
var value4;
|
|
var value2 = _createForOfIteratorHelperLoose_43917(channels);
|
|
var value3 = value2();
|
|
if (value3.done) {
|
|
return false;
|
|
}
|
|
var r3 = value3;
|
|
loopExit1: while (true) {
|
|
channels = r3.value;
|
|
moduleValue = require(dependencyMap[14]);
|
|
isChannelContentGated = moduleValue.isChannelContentGated(channels);
|
|
anyThreadsNSFWBinding = anyThreadsNSFW;
|
|
guild_id = channels.guild_id;
|
|
if (isChannelContentGated !== anyThreadsNSFWBinding(guild_id, channels.parent_id)) {
|
|
break loopExit1;
|
|
}
|
|
value4 = value2();
|
|
if (value4.done) {
|
|
return false;
|
|
}
|
|
r3 = value4;
|
|
continue;
|
|
}
|
|
CONNECTION_OPEN_43920();
|
|
}, CHANNEL_DELETE: CHANNEL_DELETE_43965, THREAD_MEMBER_UPDATE: closure3, THREAD_MEMBERS_UPDATE: closure3,
|
|
LOAD_MESSAGES_SUCCESS: closure4, MESSAGE_CREATE: closure4, MESSAGE_DELETE: closure4,
|
|
MESSAGE_DELETE_BULK: closure4, MESSAGE_ACK: closure4, CHANNEL_ACK: closure4, CHANNEL_LOCAL_ACK: closure4,
|
|
CHANNEL_SELECT: function(a0) {
|
|
LOAD_MESSAGES_SUCCESS_43931(a0);
|
|
updateSelectedChannel();
|
|
}, PASSIVE_UPDATE_V2: PASSIVE_UPDATE_V2_43967, WINDOW_FOCUS: closure5,
|
|
UPDATE_CHANNEL_DIMENSIONS: UPDATE_CHANNEL_DIMENSIONS_43968, TRY_ACK: closure5, BULK_ACK: closure5});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/ActiveJoinedThreadsStore.tsx');
|
|
exports.default = value;
|
|
exports.NO_GUILD_JOINED_THREADS = {};
|
|
}
|
|
|
|
function _isNativeReflectConstruct_43914() { // fn#43914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:300, offset: 0x01162520, 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_43914_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_43917(a0, a1) { // fn#43917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:493, offset: 0x0116257e, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun43918;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_43919(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_43919(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_43919(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun43918;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function CONNECTION_OPEN_43920() { // fn#43920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:1449, offset: 0x011626f0, size: 140 bytes, params: 1, frame: 19
|
|
var propertyName;
|
|
var clearTimeout;
|
|
env0_17 = {};
|
|
env0_21 = {};
|
|
env0_18 = {};
|
|
env0_19 = {};
|
|
env0_20 = {};
|
|
env0_23 = SelectedChannelStore.getChannelId();
|
|
for (propertyName in env0_24) {
|
|
clearTimeout = global.clearTimeout;
|
|
clearTimeout(env0_24[propertyName]);
|
|
}
|
|
env0_24 = {};
|
|
ActiveThreadsStore.forEachGuild(function(a0) {
|
|
rebuildGuild_(a0);
|
|
});
|
|
rebuildNewThreadCounts();
|
|
}
|
|
|
|
function rebuildGuild(a0) { // fn#43922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:1616, offset: 0x0116277c, size: 99 bytes, params: 2, frame: 19
|
|
var propertyName;
|
|
delete env0_17[a0];
|
|
delete env0_21[a0];
|
|
delete env0_18[a0];
|
|
delete env0_19[a0];
|
|
delete env0_20[a0];
|
|
rebuildGuild_(a0);
|
|
for (propertyName in env0_19[a0]) {
|
|
recountParent(a0, propertyName);
|
|
}
|
|
}
|
|
|
|
function rebuildGuild_(a0) { // fn#43923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:1755, offset: 0x011627df, size: 519 bytes, params: 2, frame: 43
|
|
var r17;
|
|
var r9;
|
|
var r28;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var properties4;
|
|
var properties5;
|
|
var properties6;
|
|
var propertyName3;
|
|
var channel;
|
|
var value5;
|
|
var updateInBinding;
|
|
var isForumPostUnread;
|
|
var id;
|
|
var isForumPostUnread2;
|
|
var object2;
|
|
var threadState;
|
|
var isUnread;
|
|
var isRelevant;
|
|
var isTimedRelevant;
|
|
const threadsForGuild = ActiveThreadsStore.getThreadsForGuild(a0);
|
|
const value3 = null;
|
|
for (propertyName in threadsForGuild) {
|
|
property = threadsForGuild[propertyName];
|
|
properties4 = Object.keys(property);
|
|
properties5 = 0;
|
|
properties6 = properties4.length;
|
|
if (properties4 === undefined) {
|
|
r17 = propertyName2;
|
|
continue;
|
|
}
|
|
r9 = properties5;
|
|
while (true) {
|
|
propertyName = properties4[r9];
|
|
propertyName3 = r9 + 1;
|
|
if (propertyName === undefined) {
|
|
r17 = propertyName2;
|
|
break;
|
|
}
|
|
clearTimer(propertyName);
|
|
channel = ChannelStore.getChannel(propertyName);
|
|
if (value3 == channel) {
|
|
r9 = propertyName3;
|
|
continue;
|
|
}
|
|
value5 = JoinedThreadsStore.joinTimestamp(propertyName);
|
|
if (value3 != value5) {
|
|
object2 = {channel: channel};
|
|
object2.joinTimestamp = value5.getTime();
|
|
threadState = parseThreadState(channel);
|
|
isUnread = threadState.isUnread;
|
|
isRelevant = threadState.isRelevant;
|
|
isTimedRelevant = threadState.isTimedRelevant;
|
|
updateInBinding = updateIn;
|
|
updateInBinding(env0_17, channel, object2, false);
|
|
if (isRelevant) {
|
|
r28 = object2;
|
|
continue;
|
|
}
|
|
r28 = value3;
|
|
continue;
|
|
updateInBinding(env0_21, channel, r28, false);
|
|
updateInBinding = updateIn;
|
|
if (isUnread) {
|
|
r28 = object2;
|
|
continue;
|
|
}
|
|
r28 = value3;
|
|
continue;
|
|
updateInBinding(env0_18, channel, r28, false);
|
|
if (!isTimedRelevant) {
|
|
r9 = propertyName3;
|
|
continue;
|
|
}
|
|
syncTimer(channel, true);
|
|
r9 = propertyName3;
|
|
} else {
|
|
updateInBinding = updateIn;
|
|
updateInBinding(env0_19, channel, channel, false);
|
|
isForumPostUnread = ReadStateStore.isForumPostUnread;
|
|
id = channel.id;
|
|
isForumPostUnread2 = Reflect.apply(isForumPostUnread, ReadStateStore, [id]);
|
|
if (isForumPostUnread2) {
|
|
r28 = channel;
|
|
continue;
|
|
}
|
|
r28 = value3;
|
|
continue;
|
|
updateInBinding(env0_20, channel, r28, false);
|
|
r9 = propertyName3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function rebuildNewThreadCounts() { // fn#43924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:2219, offset: 0x011629e6, size: 77 bytes, params: 1, frame: 24
|
|
var r10;
|
|
var r3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var properties4;
|
|
var properties5;
|
|
var properties6;
|
|
var propertyName3;
|
|
var propertyName4;
|
|
env0_22 = {};
|
|
for (propertyName in env0_19) {
|
|
property = env0_19[propertyName];
|
|
properties4 = Object.keys(property);
|
|
properties5 = 0;
|
|
properties6 = properties4.length;
|
|
if (properties4 === undefined) {
|
|
r10 = propertyName2;
|
|
continue;
|
|
}
|
|
for (r3 = properties5; true; r3 = propertyName4) {
|
|
propertyName3 = properties4[r3];
|
|
propertyName4 = r3 + 1;
|
|
if (propertyName3 === undefined) {
|
|
r10 = propertyName2;
|
|
break;
|
|
}
|
|
recountParent(propertyName, propertyName3);
|
|
}
|
|
}
|
|
}
|
|
|
|
function recountParent(a0, a1) { // fn#43926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:2421, offset: 0x01162a81, size: 495 bytes, params: 3, frame: 27
|
|
var r0;
|
|
var r2;
|
|
var r7;
|
|
var r4;
|
|
var r13;
|
|
var guild;
|
|
var trackedAckMessageId;
|
|
var Date;
|
|
var value5;
|
|
var joinedAt;
|
|
var value6;
|
|
var value7;
|
|
var date;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var defaultImport2;
|
|
var compare;
|
|
var value12;
|
|
var hasOpenedThread;
|
|
var value13;
|
|
var property2;
|
|
var property3;
|
|
var isNewForumThread;
|
|
var property4;
|
|
var property5;
|
|
const channel = ChannelStore.getChannel(a1);
|
|
if (channel != null) {
|
|
if (channel.isForumLikeChannel()) {
|
|
if (env0_22[a0] == null) {
|
|
env0_22[a0] = {};
|
|
}
|
|
env0_22[a0][a1] = 0;
|
|
if (env0_19[a0] != null) {
|
|
if (env0_19[a0][a1] != null) {
|
|
guild = GuildStore.getGuild(a0);
|
|
if (guild != null) {
|
|
trackedAckMessageId = ReadStateStore.getTrackedAckMessageId(a1);
|
|
if (trackedAckMessageId != null) {
|
|
r7 = trackedAckMessageId;
|
|
} else {
|
|
Date = global.Date;
|
|
value5 = Date.now();
|
|
joinedAt = guild.joinedAt;
|
|
if (joinedAt == null) {
|
|
r2 = value5;
|
|
} else {
|
|
joinedAt = guild.joinedAt;
|
|
Date = global.Date;
|
|
value6 = joinedAt instanceof Date;
|
|
joinedAt = guild.joinedAt;
|
|
if (value6) {
|
|
r0 = joinedAt.getTime();
|
|
} else if (typeof joinedAt !== 'string') {
|
|
r0 = value5;
|
|
} else {
|
|
Date = global.Date;
|
|
joinedAt = guild.joinedAt;
|
|
value7 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
r0 = (date instanceof Object ? date : value7).getTime();
|
|
}
|
|
r2 = r0;
|
|
}
|
|
r7 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).fromTimestamp(r2);
|
|
}
|
|
for (propertyName in env0_19[a0][a1]) {
|
|
if (a1 === env0_23) {
|
|
isNewForumThread = ReadStateStore.isNewForumThread;
|
|
if (!Reflect.apply(isNewForumThread, ReadStateStore, [propertyName, a1, guild])) {
|
|
r4 = propertyName2;
|
|
continue;
|
|
}
|
|
property4 = env0_22[a0];
|
|
property5 = property4[a1];
|
|
property4[a1] = typeof property5 === 'bigint' ? property5 + 1n : +property5 + 1;
|
|
r4 = propertyName2;
|
|
} else {
|
|
defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
compare = defaultImport2.compare;
|
|
value12 = Reflect.apply(compare, defaultImport2, [propertyName, r7]) > 0;
|
|
if (!value12) {
|
|
r13 = value12;
|
|
continue;
|
|
}
|
|
hasOpenedThread = ReadStateStore.hasOpenedThread;
|
|
value13 = !Reflect.apply(hasOpenedThread, ReadStateStore, [propertyName]);
|
|
r13 = value13;
|
|
if (!r13) {
|
|
r4 = propertyName2;
|
|
continue;
|
|
}
|
|
property2 = env0_22[a0];
|
|
property3 = property2[a1];
|
|
property2[a1] = typeof property3 === 'bigint' ? property3 + 1n : +property3 + 1;
|
|
r4 = propertyName2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function updateThread(a0, a1, a2) { // fn#43927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:2949, offset: 0x01162c70, size: 517 bytes, params: 4, frame: 25
|
|
var r1;
|
|
var deleteInBinding;
|
|
var clearTimerBinding;
|
|
var isForumPostUnread;
|
|
var id;
|
|
var isForumPostUnread2;
|
|
var updateInBinding;
|
|
var object2;
|
|
var threadState;
|
|
var isUnread;
|
|
var isRelevant;
|
|
var isTimedRelevant;
|
|
const value = null;
|
|
if (value == a1) {
|
|
return false;
|
|
}
|
|
const channel = ChannelStore.getChannel(a2);
|
|
const value4 = JoinedThreadsStore.joinTimestamp(a2);
|
|
if (value == channel) {
|
|
deleteInBinding = deleteIn;
|
|
deleteInBinding(env0_17, a0, a1, a2);
|
|
deleteInBinding(env0_21, a0, a1, a2);
|
|
deleteInBinding(env0_18, a0, a1, a2);
|
|
deleteInBinding(env0_19, a0, a1, a2);
|
|
deleteInBinding(env0_20, a0, a1, a2);
|
|
clearTimer(a2);
|
|
recountParent(a0, a1);
|
|
} else if (ActiveThreadsStore.isActive(a0, a1, a2)) {
|
|
if (value != value4) {
|
|
object2 = {channel: channel};
|
|
object2.joinTimestamp = value4.getTime();
|
|
threadState = parseThreadState(channel);
|
|
isUnread = threadState.isUnread;
|
|
isRelevant = threadState.isRelevant;
|
|
isTimedRelevant = threadState.isTimedRelevant;
|
|
updateInBinding = updateIn;
|
|
updateInBinding(env0_17, channel, object2, true);
|
|
r1 = isRelevant ? object2 : value;
|
|
updateInBinding(env0_21, channel, r1, true);
|
|
updateInBinding = updateIn;
|
|
r1 = isUnread ? object2 : value;
|
|
updateInBinding(env0_18, channel, r1, true);
|
|
updateInBinding = updateIn;
|
|
updateInBinding(env0_19, channel, value, true);
|
|
updateInBinding(env0_20, channel, value, true);
|
|
syncTimer(channel, isTimedRelevant);
|
|
} else {
|
|
isForumPostUnread = ReadStateStore.isForumPostUnread;
|
|
id = channel.id;
|
|
isForumPostUnread2 = Reflect.apply(isForumPostUnread, ReadStateStore, [id]);
|
|
updateInBinding = updateIn;
|
|
updateInBinding(env0_17, channel, value, true);
|
|
updateInBinding(env0_18, channel, value, true);
|
|
updateInBinding(env0_21, channel, value, true);
|
|
updateInBinding(env0_19, channel, channel, true);
|
|
updateInBinding(env0_20, channel, isForumPostUnread2 ? channel : value, true);
|
|
clearTimerBinding = clearTimer;
|
|
id = channel.id;
|
|
clearTimerBinding(id);
|
|
}
|
|
recountParent(a0, a1);
|
|
} else {
|
|
deleteInBinding = deleteIn;
|
|
deleteInBinding(env0_17, a0, a1, a2);
|
|
deleteInBinding(env0_21, a0, a1, a2);
|
|
deleteInBinding(env0_18, a0, a1, a2);
|
|
deleteInBinding(env0_19, a0, a1, a2);
|
|
deleteInBinding(env0_20, a0, a1, a2);
|
|
clearTimer(a2);
|
|
recountParent(a0, a1);
|
|
}
|
|
}
|
|
|
|
function anyThreadsNSFW(a0, a1) { // fn#43929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:3744, offset: 0x01162ea9, size: 215 bytes, params: 3, frame: 23
|
|
var r12;
|
|
var r8;
|
|
var r5;
|
|
var properties;
|
|
var properties2;
|
|
var properties3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var moduleValue;
|
|
var isChannelContentGated;
|
|
var channel;
|
|
var properties4;
|
|
var properties5;
|
|
var propertyName3;
|
|
let value = null;
|
|
if (value != a1) {
|
|
var property = env0_17[a0];
|
|
reducibleJoin3: while (true) {
|
|
if (value == property) {
|
|
r12 = value;
|
|
break reducibleJoin3;
|
|
}
|
|
property = property[a1];
|
|
r12 = property;
|
|
break reducibleJoin3;
|
|
}
|
|
if (value != r12) {
|
|
properties = Object.keys(r12);
|
|
properties2 = 0;
|
|
properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r8 = properties2;
|
|
reducibleLoop5: while (true) {
|
|
propertyName = properties[r8];
|
|
propertyName2 = r8 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop5;
|
|
}
|
|
moduleValue = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
|
isChannelContentGated = moduleValue.isChannelContentGated;
|
|
channel = r12[propertyName].channel;
|
|
if (Reflect.apply(isChannelContentGated, moduleValue, [channel])) {
|
|
return true;
|
|
}
|
|
r8 = propertyName2;
|
|
continue reducibleLoop5;
|
|
}
|
|
}
|
|
}
|
|
property = env0_19[a0];
|
|
reducibleJoin10: while (true) {
|
|
if (value == property) {
|
|
r8 = value;
|
|
break reducibleJoin10;
|
|
}
|
|
property = property[a1];
|
|
r8 = property;
|
|
break reducibleJoin10;
|
|
}
|
|
if (value != r8) {
|
|
properties = Object.keys(r8);
|
|
properties4 = 0;
|
|
properties5 = properties.length;
|
|
reducibleJoin15: while (true) {
|
|
if (properties === undefined) {
|
|
break reducibleJoin15;
|
|
}
|
|
r5 = properties4;
|
|
reducibleLoop12: while (true) {
|
|
propertyName = properties[r5];
|
|
propertyName3 = r5 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleJoin15;
|
|
}
|
|
value = require(5072) /* metro dependency 5072: AgeGateUtils */;
|
|
isChannelContentGated = value.isChannelContentGated;
|
|
if (Reflect.apply(isChannelContentGated, value, [r8[propertyName]])) {
|
|
return true;
|
|
}
|
|
r5 = propertyName3;
|
|
continue reducibleLoop12;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function THREAD_MEMBERS_UPDATE_43930(a0) { // fn#43930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:4024, offset: 0x01162f80, size: 107 bytes, params: 2, frame: 18
|
|
const channel = ChannelStore.getChannel(a0.id);
|
|
return !(channel == null || !ActiveThreadsStore.isActive(a0.guildId, channel.parent_id,
|
|
a0.id)) && updateThread(channel.guild_id, channel.parent_id, channel.id);
|
|
}
|
|
|
|
function CHANNEL_ACK_43931({channelId}) { // fn#43931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:4187, offset: 0x01162feb, size: 425 bytes, params: 2, frame: 22
|
|
var r1;
|
|
var r7;
|
|
var property;
|
|
var existsBinding;
|
|
var value7;
|
|
var isForumPostUnread2;
|
|
var threadState;
|
|
var isUnread;
|
|
var isRelevant;
|
|
var value8;
|
|
var value9;
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
if (channel == null) {
|
|
WINDOW_FOCUS_43932();
|
|
return undefined;
|
|
}
|
|
const guild_id = channel.guild_id;
|
|
const parent_id = channel.parent_id;
|
|
if (THREAD_CHANNEL_TYPES.has(channel.type)) {
|
|
if (parent_id == null) {
|
|
return false;
|
|
}
|
|
existsBinding = exists;
|
|
if (existsBinding(env0_17, channel)) {
|
|
threadState = parseThreadState(channel);
|
|
isUnread = threadState.isUnread;
|
|
isRelevant = threadState.isRelevant;
|
|
syncTimer(channel, threadState.isTimedRelevant);
|
|
existsBinding = exists;
|
|
value8 = existsBinding(env0_18, channel);
|
|
value9 = existsBinding(env0_21, channel);
|
|
if (isUnread !== value8) {
|
|
property = env0_17[guild_id][parent_id];
|
|
property = property[channel.id];
|
|
r7 = isRelevant ? property : null;
|
|
updateIn(env0_18, channel, isUnread ? property : null, true);
|
|
updateIn(env0_21, channel, r7, true);
|
|
recountParent(guild_id, parent_id);
|
|
return undefined;
|
|
}
|
|
if (isRelevant === value9) {
|
|
return false;
|
|
}
|
|
property = env0_17[guild_id][parent_id];
|
|
property = property[channel.id];
|
|
r7 = isRelevant ? property : null;
|
|
updateIn(env0_18, channel, isUnread ? property : null, true);
|
|
updateIn(env0_21, channel, r7, true);
|
|
recountParent(guild_id, parent_id);
|
|
return undefined;
|
|
}
|
|
value7 = exists(env0_20, channel);
|
|
isForumPostUnread2 = ReadStateStore.isForumPostUnread(channel.id);
|
|
if (isForumPostUnread2 === value7) {
|
|
return false;
|
|
}
|
|
updateIn(env0_20, channel, isForumPostUnread2 ? channel : null, true);
|
|
return undefined;
|
|
}
|
|
const Number = global.Number;
|
|
const value6 = Number(env0_22[guild_id]?.[channel.id]) > 0;
|
|
if (value6) {
|
|
recountParent(guild_id, channel.id);
|
|
r1 = true;
|
|
} else {
|
|
r1 = value6;
|
|
}
|
|
return r1;
|
|
}
|
|
|
|
function BULK_ACK_43932() { // fn#43932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:4792, offset: 0x01163194, size: 549 bytes, params: 1, frame: 39
|
|
var r19;
|
|
var r13;
|
|
var r7;
|
|
var r17;
|
|
var r11;
|
|
var r5;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var properties4;
|
|
var properties5;
|
|
var properties6;
|
|
var propertyName3;
|
|
var propertyName4;
|
|
var property2;
|
|
var properties7;
|
|
var properties8;
|
|
var properties9;
|
|
var propertyName5;
|
|
var propertyName6;
|
|
var property3;
|
|
var parseThreadStateBinding;
|
|
var channel;
|
|
var threadState;
|
|
var isUnread;
|
|
var isRelevant;
|
|
var isTimedRelevant;
|
|
var syncTimerBinding;
|
|
var propertyName7;
|
|
var properties12;
|
|
var properties13;
|
|
var properties14;
|
|
var propertyName8;
|
|
var propertyName9;
|
|
var property4;
|
|
var properties15;
|
|
var properties16;
|
|
var properties17;
|
|
var propertyName10;
|
|
var propertyName11;
|
|
var property5;
|
|
var isForumPostUnread;
|
|
for (propertyName in env0_17) {
|
|
property = env0_17[propertyName];
|
|
properties4 = Object.keys(property);
|
|
properties5 = 0;
|
|
properties6 = properties4.length;
|
|
if (properties4 === undefined) {
|
|
r19 = propertyName2;
|
|
continue;
|
|
}
|
|
r13 = properties5;
|
|
while (true) {
|
|
propertyName3 = properties4[r13];
|
|
propertyName4 = r13 + 1;
|
|
if (propertyName3 === undefined) {
|
|
r19 = propertyName2;
|
|
break;
|
|
}
|
|
property2 = env0_17[propertyName][propertyName3];
|
|
properties7 = Object.keys(property2);
|
|
properties8 = 0;
|
|
properties9 = properties7.length;
|
|
if (properties7 === undefined) {
|
|
r13 = propertyName4;
|
|
continue;
|
|
}
|
|
r7 = properties8;
|
|
while (true) {
|
|
propertyName5 = properties7[r7];
|
|
propertyName6 = r7 + 1;
|
|
if (propertyName5 === undefined) {
|
|
r13 = propertyName4;
|
|
break;
|
|
}
|
|
property3 = env0_17[propertyName][propertyName3][propertyName5];
|
|
parseThreadStateBinding = parseThreadState;
|
|
channel = property3.channel;
|
|
threadState = parseThreadStateBinding(channel);
|
|
isUnread = threadState.isUnread;
|
|
isRelevant = threadState.isRelevant;
|
|
isTimedRelevant = threadState.isTimedRelevant;
|
|
if (!isUnread) {
|
|
continue;
|
|
}
|
|
updateIn({}, property3.channel, property3, false);
|
|
if (!isRelevant) {
|
|
continue;
|
|
}
|
|
updateIn({}, property3.channel, property3, false);
|
|
syncTimerBinding = syncTimer;
|
|
channel = property3.channel;
|
|
syncTimerBinding(channel, isTimedRelevant);
|
|
r7 = propertyName6;
|
|
}
|
|
}
|
|
}
|
|
for (propertyName in env0_19) {
|
|
property = env0_19[propertyName];
|
|
properties12 = Object.keys(property);
|
|
properties13 = 0;
|
|
properties14 = properties12.length;
|
|
if (properties12 === undefined) {
|
|
r17 = propertyName7;
|
|
continue;
|
|
}
|
|
r11 = properties13;
|
|
while (true) {
|
|
propertyName8 = properties12[r11];
|
|
propertyName9 = r11 + 1;
|
|
if (propertyName8 === undefined) {
|
|
r17 = propertyName7;
|
|
break;
|
|
}
|
|
property4 = env0_19[propertyName][propertyName8];
|
|
properties15 = Object.keys(property4);
|
|
properties16 = 0;
|
|
properties17 = properties15.length;
|
|
if (properties15 === undefined) {
|
|
r11 = propertyName9;
|
|
continue;
|
|
}
|
|
r5 = properties16;
|
|
while (true) {
|
|
propertyName10 = properties15[r5];
|
|
propertyName11 = r5 + 1;
|
|
if (propertyName10 === undefined) {
|
|
r11 = propertyName9;
|
|
break;
|
|
}
|
|
property5 = env0_19[propertyName][propertyName8][propertyName10];
|
|
isForumPostUnread = ReadStateStore.isForumPostUnread;
|
|
if (!Reflect.apply(isForumPostUnread, ReadStateStore, [propertyName10])) {
|
|
r5 = propertyName11;
|
|
continue;
|
|
}
|
|
updateIn({}, property5, property5, false);
|
|
r5 = propertyName11;
|
|
}
|
|
}
|
|
}
|
|
rebuildNewThreadCounts();
|
|
}
|
|
|
|
function updateSelectedChannel() { // fn#43933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5209, offset: 0x011633b9, size: 55 bytes, params: 1, frame: 12
|
|
const binding = env0_23;
|
|
const channelId = SelectedChannelStore.getChannelId();
|
|
env0_23 = channelId;
|
|
if (channelId === binding) {
|
|
return false;
|
|
}
|
|
const recountChannelIdBinding = recountChannelId;
|
|
recountChannelIdBinding(binding);
|
|
recountChannelIdBinding(env0_23);
|
|
}
|
|
|
|
function parseThreadState(a0) { // fn#43934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5327, offset: 0x011633f0, size: 221 bytes, params: 2, frame: 17
|
|
var r1;
|
|
var Date;
|
|
var value;
|
|
const getMentionCount = ReadStateStore.getMentionCount;
|
|
const value3 = Reflect.apply(getMentionCount, ReadStateStore, [a0.id]) > 0;
|
|
const r4 = ReadStateStore.hasUnread(a0.id) && !JoinedThreadsStore.isMuted(a0.id);
|
|
const hasFlag = a0.hasFlag;
|
|
const PINNED = ChannelFlags.PINNED;
|
|
const hasFlag2 = Reflect.apply(hasFlag, a0, [PINNED]);
|
|
const isActiveThread2 = a0.isActiveThread();
|
|
if (isActiveThread2) {
|
|
value = (importDefault(5089) /* metro dependency 5089: getThreadAutoArchiveTimeOnce */)(a0);
|
|
Date = global.Date;
|
|
value = value > Date.now();
|
|
r1 = value;
|
|
} else {
|
|
r1 = isActiveThread2;
|
|
}
|
|
const object2 = {};
|
|
let r2 = (isActiveThread2 || hasFlag2) && r4;
|
|
r2 = !r2 ? value3 : r2;
|
|
object2.isUnread = r2;
|
|
r2 = r1 || hasFlag2;
|
|
r2 = !r2 ? r4 : r2;
|
|
r2 = !r2 ? value3 : r2;
|
|
object2.isRelevant = r2;
|
|
object2.isTimedRelevant = r1;
|
|
return object2;
|
|
}
|
|
|
|
function syncTimer(a0, a1) { // fn#43935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5567, offset: 0x011634cd, size: 42 bytes, params: 3, frame: 12
|
|
clearTimer(a0.id);
|
|
if (a1) {
|
|
setTimer(a0);
|
|
}
|
|
}
|
|
|
|
function clearTimer(a0) { // fn#43938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5775, offset: 0x011635af, size: 52 bytes, params: 2, frame: 13
|
|
if (a0 in env0_24) {
|
|
global.clearTimeout(env0_24[a0]);
|
|
delete env0_24[a0];
|
|
}
|
|
}
|
|
|
|
function updateIn(a0, {guild_id, parent_id, id}, a2, a3) { // fn#43939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5839, offset: 0x011635e3, size: 219 bytes, params: 5, frame: 18
|
|
var property;
|
|
var object3;
|
|
var object4;
|
|
let value = guild_id != null;
|
|
if (value && parent_id != null && id != null) {
|
|
if (!(guild_id in a0)) {
|
|
a0[guild_id] = {};
|
|
}
|
|
if (!(parent_id in a0[guild_id])) {
|
|
a0[guild_id][parent_id] = {};
|
|
}
|
|
if (a3) {
|
|
object3 = {};
|
|
copyDataProperties(object3, a0[guild_id], undefined);
|
|
object4 = {};
|
|
property = a0[guild_id];
|
|
copyDataProperties(object4, property[parent_id], property);
|
|
object3[parent_id] = object4;
|
|
a0[guild_id] = object3;
|
|
}
|
|
if (a2 === null) {
|
|
delete a0[guild_id][parent_id][id];
|
|
value = importDefault(22) /* metro dependency 22 */;
|
|
if (value.isEmpty(a0[guild_id][parent_id])) {
|
|
delete a0[guild_id][parent_id];
|
|
}
|
|
} else {
|
|
a0[guild_id][parent_id][id] = a2;
|
|
}
|
|
}
|
|
}
|
|
|
|
function deleteIn(a0, a1, a2, a3) { // fn#43940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:6096, offset: 0x011636be, size: 173 bytes, params: 5, frame: 18
|
|
var r8;
|
|
var object3;
|
|
var object4;
|
|
var defaultImport;
|
|
const value = a2;
|
|
let r3 = a1 != null && value != null && a3 != null;
|
|
if (r3) {
|
|
r3 = existsIn(a0, a1, value, a3);
|
|
r8 = value;
|
|
}
|
|
if (r3) {
|
|
object3 = {};
|
|
copyDataProperties(object3, a0[a1], r8);
|
|
object4 = {};
|
|
copyDataProperties(object4, a0[a1][value], r8);
|
|
object3[value] = object4;
|
|
a0[a1] = object3;
|
|
delete a0[a1][value][a3];
|
|
defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
if (defaultImport.isEmpty(a0[a1][value])) {
|
|
delete a0[a1][value];
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun43943(a0) { // fn#43943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:6428, offset: 0x011637bc, size: 454 bytes, params: 2, frame: 16
|
|
const closure = ActiveJoinedThreadsStore;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: function() {
|
|
this.waitFor(ActiveThreadsStore, ChannelStore, GuildStore, JoinedThreadsStore, ReadStateStore,
|
|
SelectedChannelStore);
|
|
this.syncWith([SelectedChannelStore], updateSelectedChannel);
|
|
}}, {key: 'hasActiveJoinedUnreadThreads', value: value_43946}, {key: 'getActiveUnjoinedThreadsForParent',
|
|
value: value_43947}, {key: 'getActiveJoinedThreadsForParent', value: value_43948},
|
|
{key: 'getAllActiveJoinedThreads', value: value_43949}, {key: 'getActiveJoinedThreadsForGuild',
|
|
value: value_43950}, {key: 'getActiveJoinedUnreadThreadsForGuild', value: value_43951},
|
|
{key: 'getActiveJoinedUnreadThreadsForParent', value: value_43952},
|
|
{key: 'getActiveJoinedRelevantThreadsForGuild', value: value_43953},
|
|
{key: 'getActiveJoinedRelevantThreadsForParent', value: value_43954}, {key: 'getActiveUnjoinedThreadsForGuild',
|
|
value: value_43955}, {key: 'getActiveUnjoinedUnreadThreadsForGuild', value: value_43956},
|
|
{key: 'getActiveUnjoinedUnreadThreadsForParent', value: value_43957}, {key: 'getNewThreadCountsForGuild',
|
|
value: value_43958}, {key: 'computeAllActiveJoinedThreads', value: value_43959}, {key: 'getNewThreadCount',
|
|
value: value_43960}, {key: 'getActiveThreadCount', value: value_43961}]);
|
|
}
|
|
|
|
function CHANNEL_DELETE_43965({channel}) { // fn#43965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:9512, offset: 0x01163d66, size: 483 bytes, params: 2, frame: 17
|
|
var r4;
|
|
var r1;
|
|
var r0;
|
|
var parent_id;
|
|
var binding;
|
|
var property;
|
|
var keys;
|
|
let guild_id = channel.guild_id;
|
|
const r3 = guild_id != null && channel.parent_id != null;
|
|
value = false;
|
|
if (r3) {
|
|
guild_id = channel.guild_id;
|
|
r4 = guild_id in env0_17 && channel.parent_id in env0_17[channel.guild_id];
|
|
if (r4) {
|
|
delete env0_17[channel.guild_id][channel.parent_id];
|
|
r1 = true;
|
|
} else {
|
|
r1 = value;
|
|
}
|
|
guild_id = channel.guild_id;
|
|
value = guild_id in env0_18;
|
|
r4 = value && channel.parent_id in env0_18[channel.guild_id];
|
|
if (r4) {
|
|
delete env0_18[channel.guild_id][channel.parent_id];
|
|
r1 = true;
|
|
}
|
|
guild_id = channel.guild_id;
|
|
value = guild_id in env0_21;
|
|
r4 = value && channel.parent_id in env0_21[channel.guild_id];
|
|
if (r4) {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
keys = value.keys;
|
|
binding = env0_21;
|
|
guild_id = channel.guild_id;
|
|
property = binding[guild_id];
|
|
parent_id = channel.parent_id;
|
|
value = Reflect.apply(keys, value, [property[parent_id]]);
|
|
value.forEach(clearTimer);
|
|
binding = env0_21;
|
|
guild_id = channel.guild_id;
|
|
property = binding[guild_id];
|
|
parent_id = channel.parent_id;
|
|
delete property[parent_id];
|
|
value = true;
|
|
r1 = value;
|
|
}
|
|
guild_id = channel.guild_id;
|
|
value = guild_id in env0_19;
|
|
r4 = value && channel.parent_id in env0_19[channel.guild_id];
|
|
if (r4) {
|
|
delete env0_19[channel.guild_id][channel.parent_id];
|
|
r1 = true;
|
|
}
|
|
guild_id = channel.guild_id;
|
|
value = guild_id in env0_20;
|
|
r4 = value && channel.parent_id in env0_20[channel.guild_id];
|
|
if (r4) {
|
|
delete env0_20[channel.guild_id][channel.parent_id];
|
|
r1 = true;
|
|
}
|
|
if (r1) {
|
|
recountParent(channel.guild_id, channel.parent_id);
|
|
r0 = r1;
|
|
} else {
|
|
r0 = r1;
|
|
}
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function PASSIVE_UPDATE_V2_43967(a0) { // fn#43967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:10687, offset: 0x01163f64, size: 45 bytes, params: 2, frame: 11
|
|
if (a0.channels.length > 0) {
|
|
rebuildGuild(a0.guildId);
|
|
}
|
|
}
|
|
|
|
function UPDATE_CHANNEL_DIMENSIONS_43968({channelId}) { // fn#43968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:10833, offset: 0x01163f91, size: 84 bytes, params: 2, frame: 16
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
return !(channel == null || !channel.isThread()) && updateThread(channel.guild_id, channel.parent_id, channel.id);
|
|
}
|
|
|
|
function setTimer(a0) { // fn#43936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5611, owner: syncTimer.setTimer, offset: 0x011634f7, size: 99 bytes, params: 2, frame: 18
|
|
var environment;
|
|
const env0_0 = a0;
|
|
let value = environment.__proto__;
|
|
const binding = env1_24;
|
|
const id = a0.id;
|
|
const setTimeout = global.setTimeout;
|
|
value = (importDefault(5089) /* metro dependency 5089: getThreadAutoArchiveTimeOnce */)(a0);
|
|
const Date = global.Date;
|
|
value -= Date.now();
|
|
value += 1;
|
|
binding[id] = setTimeout(_fun43937, value);
|
|
}
|
|
|
|
function value_43946(a0, a1) { // fn#43946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:6900, offset: 0x011639cd, size: 34 bytes, params: 3, frame: 4
|
|
const value = environment.__proto__;
|
|
return a0 in env1_18 && a1 in env1_18[a0];
|
|
}
|
|
|
|
function value_43947(a0, a1) { // fn#43947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:6988, offset: 0x011639ef, size: 44 bytes, params: 3, frame: 3
|
|
return a0 in env1_19 && env1_19[a0][a1] != null ? env1_19[a0][a1] : env1_28;
|
|
}
|
|
|
|
function value_43948(a0, a1) { // fn#43948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7092, offset: 0x01163a1b, size: 44 bytes, params: 3, frame: 3
|
|
return a0 in env1_17 && env1_17[a0][a1] != null ? env1_17[a0][a1] : env1_27;
|
|
}
|
|
|
|
function value_43950(a0) { // fn#43950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7256, offset: 0x01163a47, size: 26 bytes, params: 2, frame: 3
|
|
return env1_17[a0] ?? env1_25;
|
|
}
|
|
|
|
function value_43951(a0) { // fn#43951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7352, offset: 0x01163a61, size: 26 bytes, params: 2, frame: 3
|
|
return env1_18[a0] ?? env1_25;
|
|
}
|
|
|
|
function value_43952(a0, a1) { // fn#43952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7449, offset: 0x01163a7b, size: 39 bytes, params: 3, frame: 11
|
|
return this.getActiveJoinedUnreadThreadsForGuild(a0)[a1] ?? env1_27;
|
|
}
|
|
|
|
function value_43953(a0) { // fn#43953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7592, offset: 0x01163aa2, size: 26 bytes, params: 2, frame: 3
|
|
return env1_21[a0] ?? env1_25;
|
|
}
|
|
|
|
function value_43954(a0, a1) { // fn#43954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7691, offset: 0x01163abc, size: 39 bytes, params: 3, frame: 11
|
|
return this.getActiveJoinedRelevantThreadsForGuild(a0)[a1] ?? env1_27;
|
|
}
|
|
|
|
function value_43955(a0) { // fn#43955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7830, offset: 0x01163ae3, size: 26 bytes, params: 2, frame: 3
|
|
return env1_19[a0] ?? env1_26;
|
|
}
|
|
|
|
function value_43956(a0) { // fn#43956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:7928, offset: 0x01163afd, size: 26 bytes, params: 2, frame: 3
|
|
return env1_20[a0] ?? env1_25;
|
|
}
|
|
|
|
function value_43957(a0, a1) { // fn#43957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:8027, offset: 0x01163b17, size: 41 bytes, params: 3, frame: 11
|
|
return this.getActiveUnjoinedUnreadThreadsForGuild(a0)[a1] ?? env1_27;
|
|
}
|
|
|
|
function value_43958(a0) { // fn#43958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:8160, offset: 0x01163b40, size: 26 bytes, params: 2, frame: 3
|
|
return env1_22[a0] ?? env1_29;
|
|
}
|
|
|
|
function value_43959(a0) { // fn#43959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:8249, offset: 0x01163b5a, size: 168 bytes, params: 2, frame: 32
|
|
var r17;
|
|
var r9;
|
|
var r3;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var properties4;
|
|
var properties5;
|
|
var properties6;
|
|
var propertyName3;
|
|
var propertyName4;
|
|
var property2;
|
|
var properties7;
|
|
var properties8;
|
|
var properties9;
|
|
var propertyName5;
|
|
var propertyName6;
|
|
var push;
|
|
var channel;
|
|
const items2 = [];
|
|
const properties = Object.keys(env1_17);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r17 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r17];
|
|
propertyName2 = r17 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop1;
|
|
}
|
|
if (propertyName !== a0) {
|
|
reducibleJoin4: while (true) {
|
|
if (a0 != null) {
|
|
r17 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
}
|
|
property = env1_17[propertyName];
|
|
properties4 = Object.keys(property);
|
|
properties5 = 0;
|
|
properties6 = properties4.length;
|
|
if (properties4 === undefined) {
|
|
r17 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r9 = properties5;
|
|
reducibleLoop5: while (true) {
|
|
propertyName3 = properties4[r9];
|
|
propertyName4 = r9 + 1;
|
|
if (propertyName3 === undefined) {
|
|
r17 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
property2 = env1_17[propertyName][propertyName3];
|
|
properties7 = Object.keys(property2);
|
|
properties8 = 0;
|
|
properties9 = properties7.length;
|
|
if (properties7 === undefined) {
|
|
r9 = propertyName4;
|
|
continue reducibleLoop5;
|
|
}
|
|
r3 = properties8;
|
|
reducibleLoop7: while (true) {
|
|
propertyName5 = properties7[r3];
|
|
propertyName6 = r3 + 1;
|
|
if (propertyName5 === undefined) {
|
|
r9 = propertyName4;
|
|
continue reducibleLoop5;
|
|
}
|
|
push = items2.push;
|
|
channel = env1_17[propertyName][propertyName3][propertyName5].channel;
|
|
Reflect.apply(push, items2, [channel]);
|
|
r3 = propertyName6;
|
|
continue reducibleLoop7;
|
|
}
|
|
continue reducibleLoop5;
|
|
}
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return items2;
|
|
}
|
|
|
|
function value_43960(a0, a1) { // fn#43960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:8411, offset: 0x01163c02, size: 46 bytes, params: 3, frame: 4
|
|
const value = environment.__proto__;
|
|
return env1_22[a0]?.[a1] ?? 0;
|
|
}
|
|
|
|
function value_43961(a0, a1) { // fn#43961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:8517, offset: 0x01163c30, size: 130 bytes, params: 3, frame: 19
|
|
const value2 = undefined;
|
|
const defaultImport = importDefault(22) /* metro dependency 22 */;
|
|
let size = defaultImport.size;
|
|
let property = env1_17[a0];
|
|
let r1 = property == null ? value2 : property[a1];
|
|
r1 = r1 ?? ({});
|
|
const value3 = Reflect.apply(size, defaultImport, [r1]);
|
|
const defaultImport2 = defaultImport;
|
|
size = defaultImport2.size;
|
|
property = env1_19[a0];
|
|
let r0 = property == null ? value2 : property[a1];
|
|
r0 = r0 ?? ({});
|
|
return value3 + Reflect.apply(size, defaultImport2, [r0]);
|
|
}
|
|
|
|
function _fun43937() { // fn#43937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5249:5652, offset: 0x0116355a, size: 85 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__.__proto__;
|
|
const channel = ChannelStore.getChannel(env0_0.id);
|
|
if (channel != null) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
value.dispatch({type: 'THREAD_UPDATE', channel: channel});
|
|
}
|
|
}
|
|
|