Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,411 @@
|
||||
/* Metro module 3786; source: modules/threads/JoinedThreadsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 1226, 3787, 22, 566, 694, 2] */
|
||||
function _fun28754(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#28754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:6, offset: 0x00f81c54, size: 534 bytes, params: 8, frame: 22
|
||||
const closure = function(a0) {
|
||||
var guildId = a0.guildId;
|
||||
var env0_0 = guildId;
|
||||
var members = a0.members;
|
||||
if (guildId != null && members != null) {
|
||||
members.forEach(_fun28765);
|
||||
}
|
||||
};
|
||||
const closure2 = function(a0) {
|
||||
var guildId = a0.guildId;
|
||||
var env0_0 = guildId;
|
||||
if (guildId != null) {
|
||||
a0.data.forEach(_fun28767);
|
||||
}
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
||||
const env0_7 = (require(1383) /* metro dependency 1383: ChannelRecord */).ALL_CHANNEL_TYPES;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
let env0_9 = {};
|
||||
let value = importDefault(3787) /* metro dependency 3787: MuteTimers */;
|
||||
value = new value();
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun28769(Store).displayName = 'JoinedThreadsStore';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CONNECTION_OPEN: CONNECTION_OPEN_28779,
|
||||
OVERLAY_INITIALIZE: function({joinedThreads}) {
|
||||
env0_9 = importDefault(dependencyMap[8])(joinedThreads).map(_fun28782).keyBy('threadId').value();
|
||||
}, GUILD_CREATE: function({guild}) {
|
||||
deleteGuildThreads(guild.id);
|
||||
storeThreads(guild);
|
||||
}, GUILD_DELETE: function({guild}) {
|
||||
deleteGuildThreads(guild.id);
|
||||
}, THREAD_CREATE: function({channel}) {
|
||||
storeThread(channel);
|
||||
}, THREAD_LIST_SYNC: closure, SEARCH_MESSAGES_SUCCESS: closure2, MOD_VIEW_SEARCH_MESSAGES_SUCCESS: closure2,
|
||||
LOAD_THREADS_SUCCESS: closure, LOAD_ARCHIVED_THREADS_SUCCESS: closure, THREAD_DELETE: THREAD_DELETE,
|
||||
THREAD_MEMBER_UPDATE: THREAD_MEMBER_UPDATE_28787, THREAD_MEMBER_LOCAL_UPDATE: THREAD_MEMBER_LOCAL_UPDATE,
|
||||
THREAD_MEMBERS_UPDATE: THREAD_MEMBERS_UPDATE_28789});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/threads/JoinedThreadsStore.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_28755() { // fn#28755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:186, offset: 0x00f81e6a, 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_28755_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function deleteGuildThreads(a0) { // fn#28758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:413, offset: 0x00f81ec8, size: 89 bytes, params: 2, frame: 13
|
||||
const env0_0 = a0;
|
||||
env0_9 = (importDefault(22) /* metro dependency 22 */)(env0_9).reject(_fun28759).keyBy('threadId').value();
|
||||
}
|
||||
|
||||
function storeThreads({threads}) { // fn#28760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:510, offset: 0x00f81f36, size: 36 bytes, params: 2, frame: 11
|
||||
if (threads != null) {
|
||||
threads.forEach(storeThread);
|
||||
}
|
||||
}
|
||||
|
||||
function storeThread(a0) { // fn#28761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:585, offset: 0x00f81f5a, size: 194 bytes, params: 2, frame: 16
|
||||
var member;
|
||||
var binding;
|
||||
var id;
|
||||
var object2;
|
||||
var Date;
|
||||
var joinTimestamp;
|
||||
var value4;
|
||||
var date;
|
||||
var handleMutedChangeBinding;
|
||||
if (ALL_CHANNEL_TYPES.has(a0.type) && a0.member != null) {
|
||||
binding = env0_9;
|
||||
id = a0.id;
|
||||
object2 = {};
|
||||
object2.threadId = a0.id;
|
||||
object2.guildId = a0.guild_id;
|
||||
member = a0.member;
|
||||
object2.flags = member.flags;
|
||||
member = a0.member;
|
||||
object2.muted = member.muted;
|
||||
member = a0.member;
|
||||
object2.muteConfig = member.muteConfig;
|
||||
Date = global.Date;
|
||||
member = a0.member;
|
||||
joinTimestamp = member.joinTimestamp;
|
||||
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
object2.joinTimestamp = date instanceof Object ? date : value4;
|
||||
binding[id] = object2;
|
||||
handleMutedChangeBinding = handleMutedChange;
|
||||
id = a0.id;
|
||||
handleMutedChangeBinding(id);
|
||||
}
|
||||
}
|
||||
|
||||
function handleMutedChange(a0) { // fn#28762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:829, offset: 0x00f8201c, size: 239 bytes, params: 2, frame: 18
|
||||
var Set;
|
||||
var value2;
|
||||
var set;
|
||||
var value6;
|
||||
const env0_0 = a0;
|
||||
const property = env0_9[a0];
|
||||
let binding = env0_10;
|
||||
binding.clearTimer(a0);
|
||||
if (property.muted === true) {
|
||||
Set = global.Set;
|
||||
binding = env0_11;
|
||||
set = new Set(binding);
|
||||
env0_11 = set;
|
||||
set.add(a0);
|
||||
binding = env0_10;
|
||||
if (binding.setTimer(a0, property.muteConfig, _fun28763)) {
|
||||
env0_9[a0].muted = false;
|
||||
Set = global.Set;
|
||||
binding = env0_11;
|
||||
value6 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(binding);
|
||||
(set instanceof Object ? set : value6).delete(a0);
|
||||
}
|
||||
} else {
|
||||
Set = global.Set;
|
||||
binding = env0_11;
|
||||
value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
set = new Set(binding);
|
||||
(set instanceof Object ? set : value2).delete(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function LOAD_ARCHIVED_THREADS_SUCCESS_28764({guildId, members}) { // fn#28764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1081, offset: 0x00f82165, size: 55 bytes, params: 2, frame: 13
|
||||
if (guildId != null && members != null) {
|
||||
members.forEach(_fun28765);
|
||||
}
|
||||
}
|
||||
|
||||
function MOD_VIEW_SEARCH_MESSAGES_SUCCESS_28766({guildId, data}) { // fn#28766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1334, offset: 0x00f8221e, size: 44 bytes, params: 2, frame: 12
|
||||
if (guildId != null) {
|
||||
data.forEach(function({members}) {
|
||||
members.forEach(_fun28768);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function _fun28769(a0) { // fn#28769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1604, offset: 0x00f822ea, size: 233 bytes, params: 2, frame: 16
|
||||
const closure = JoinedThreadsStoreClass;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(AuthenticationStore);
|
||||
}}, {key: 'hasJoined', value: value_28772}, {key: 'joinTimestamp', value: value_28773}, {key: 'flags',
|
||||
value: value_28774}, {key: 'getInitialOverlayState', value: value_28775}, {key: 'getMuteConfig',
|
||||
value: value_28776}, {key: 'getMutedThreads', value: value_28777}, {key: 'isMuted', value: value_28778}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_28779({guilds}) { // fn#28779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2552, offset: 0x00f82476, size: 85 bytes, params: 2, frame: 11
|
||||
env0_10.reset();
|
||||
const Set = global.Set;
|
||||
const set = new Set();
|
||||
env0_9 = {};
|
||||
guilds.forEach(function(a0) {
|
||||
storeThreads(a0);
|
||||
});
|
||||
}
|
||||
|
||||
function OVERLAY_INITIALIZE_28781({joinedThreads}) { // fn#28781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2671, offset: 0x00f824de, size: 88 bytes, params: 2, frame: 13
|
||||
env0_9 = (importDefault(22) /* metro dependency 22 */)(joinedThreads).map(function(a0) {
|
||||
var r3;
|
||||
var object = {};
|
||||
copyDataProperties(object, a0, r3);
|
||||
var Date = global.Date;
|
||||
object['joinTimestamp'] = new Date(a0.joinTimestamp);
|
||||
return object;
|
||||
}).keyBy('threadId').value();
|
||||
}
|
||||
|
||||
function THREAD_DELETE({channel}) { // fn#28786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:3363, offset: 0x00f825cd, size: 61 bytes, params: 2, frame: 13
|
||||
var object2;
|
||||
let id = channel.id;
|
||||
if (id in env0_9) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_9, id);
|
||||
id = channel.id;
|
||||
delete object2[id];
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function THREAD_MEMBER_UPDATE_28787(a0) { // fn#28787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:3474, offset: 0x00f8260a, size: 158 bytes, params: 2, frame: 16
|
||||
const id2 = AuthenticationStore.getId();
|
||||
const userId = a0.userId;
|
||||
if (id2 !== userId) {
|
||||
return false;
|
||||
}
|
||||
const binding = env0_9;
|
||||
const id = a0.id;
|
||||
const object2 = {};
|
||||
object2.threadId = a0.id;
|
||||
object2.guildId = a0.guildId;
|
||||
object2.flags = a0.flags;
|
||||
object2.muted = a0.muted;
|
||||
object2.muteConfig = a0.muteConfig;
|
||||
const Date = global.Date;
|
||||
const joinTimestamp = a0.joinTimestamp;
|
||||
const value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(joinTimestamp);
|
||||
object2.joinTimestamp = date instanceof Object ? date : value3;
|
||||
binding[id] = object2;
|
||||
handleMutedChange(a0.id);
|
||||
}
|
||||
|
||||
function THREAD_MEMBER_LOCAL_UPDATE({id, userId, guildId, isJoining}) { // fn#28788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:3730, offset: 0x00f826a8, size: 155 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var r0;
|
||||
var value3;
|
||||
var binding;
|
||||
var object2;
|
||||
const getId = AuthenticationStore.getId;
|
||||
const value2 = Reflect.apply(getId, AuthenticationStore, []) === userId;
|
||||
if (value2) {
|
||||
value3 = guildId !== null;
|
||||
if (value3) {
|
||||
binding = env0_9;
|
||||
if (isJoining) {
|
||||
object2 = {threadId: id, guildId: guildId, flags: 0, muted: true};
|
||||
object2.muteConfig = {end_time: undefined};
|
||||
object2.joinTimestamp = new global.Date();
|
||||
binding[id] = object2;
|
||||
} else {
|
||||
delete binding[id];
|
||||
}
|
||||
r1 = undefined;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function THREAD_MEMBERS_UPDATE_28789(a0) { // fn#28789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:3982, offset: 0x00f82743, size: 145 bytes, params: 2, frame: 17
|
||||
var r7;
|
||||
var r3;
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
let env0_1 = false;
|
||||
const removedMemberIds = a0.removedMemberIds;
|
||||
const value = removedMemberIds != null;
|
||||
if (value) {
|
||||
r3 = removedMemberIds.includes(AuthenticationStore.getId());
|
||||
r7 = AuthenticationStore;
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
r3 = r3 && a0.id in env0_9;
|
||||
if (r3) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, env0_9, r7);
|
||||
delete object2[a0.id];
|
||||
env0_1 = true;
|
||||
}
|
||||
const addedMembers = a0.addedMembers;
|
||||
if (addedMembers != null) {
|
||||
addedMembers.forEach(_fun28790);
|
||||
}
|
||||
return env0_1;
|
||||
}
|
||||
|
||||
function _fun28763() { // fn#28763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:951, offset: 0x00f8210b, size: 90 bytes, params: 1, frame: 13
|
||||
let binding = env1_9;
|
||||
const binding2 = env0_0;
|
||||
binding[binding2].muted = false;
|
||||
const Set = global.Set;
|
||||
binding = env1_11;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(binding);
|
||||
(set instanceof Object ? set : value3).delete(binding2);
|
||||
env1_12.emitChange();
|
||||
}
|
||||
|
||||
function _fun28765(a0) { // fn#28765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1177, offset: 0x00f8219c, size: 130 bytes, params: 2, frame: 16
|
||||
const binding = env1_9;
|
||||
const id = a0.id;
|
||||
const object2 = {};
|
||||
object2.threadId = a0.id;
|
||||
object2.guildId = guildId;
|
||||
object2.flags = a0.flags;
|
||||
object2.muted = a0.muted;
|
||||
object2.muteConfig = a0.muteConfig;
|
||||
const Date = global.Date;
|
||||
const joinTimestamp = a0.joinTimestamp;
|
||||
const value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(joinTimestamp);
|
||||
object2.joinTimestamp = date instanceof Object ? date : value3;
|
||||
binding[id] = object2;
|
||||
handleMutedChange(a0.id);
|
||||
}
|
||||
|
||||
function _fun28767({members}) { // fn#28767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1411, offset: 0x00f8224a, size: 30 bytes, params: 2, frame: 11
|
||||
members.forEach(_fun28768);
|
||||
}
|
||||
|
||||
function value_28772(a0) { // fn#28772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2001, offset: 0x00f823d3, size: 16 bytes, params: 2, frame: 2
|
||||
return a0 in env1_9;
|
||||
}
|
||||
|
||||
function value_28773(a0) { // fn#28773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2056, offset: 0x00f823e3, size: 33 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_9[a0]?.joinTimestamp;
|
||||
}
|
||||
|
||||
function value_28774(a0) { // fn#28774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2140, offset: 0x00f82404, size: 32 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_9[a0]?.flags;
|
||||
}
|
||||
|
||||
function value_28775() { // fn#28775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2233, offset: 0x00f82424, size: 27 bytes, params: 1, frame: 11
|
||||
const Object = global.Object;
|
||||
return Object.values(env1_9);
|
||||
}
|
||||
|
||||
function value_28776(a0) { // fn#28776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:2297, offset: 0x00f8243f, size: 33 bytes, params: 2, frame: 3
|
||||
const value = environment.__proto__;
|
||||
return env1_9[a0]?.muteConfig;
|
||||
}
|
||||
|
||||
function _fun28790(a0) { // fn#28790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:4171, offset: 0x00f827d4, size: 182 bytes, params: 2, frame: 18
|
||||
var object3;
|
||||
var binding;
|
||||
var id;
|
||||
var object4;
|
||||
var Date;
|
||||
var joinTimestamp;
|
||||
var value3;
|
||||
var date;
|
||||
var handleMutedChangeBinding;
|
||||
const userId = a0.userId;
|
||||
const getId = AuthenticationStore.getId;
|
||||
if (userId === Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
object3 = {};
|
||||
copyDataProperties(object3, env1_9, undefined);
|
||||
binding = env0_0;
|
||||
id = binding.id;
|
||||
object4 = {};
|
||||
object4.threadId = binding.id;
|
||||
object4.guildId = binding.guildId;
|
||||
object4.flags = a0.flags;
|
||||
object4.muted = a0.muted;
|
||||
object4.muteConfig = a0.muteConfig;
|
||||
Date = global.Date;
|
||||
joinTimestamp = a0.joinTimestamp;
|
||||
value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
object4.joinTimestamp = date instanceof Object ? date : value3;
|
||||
object3[id] = object4;
|
||||
handleMutedChangeBinding = handleMutedChange;
|
||||
id = binding.id;
|
||||
handleMutedChangeBinding(id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun28768(a0) { // fn#28768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3913:1438, offset: 0x00f82268, size: 130 bytes, params: 2, frame: 16
|
||||
const binding = env2_9;
|
||||
const id = a0.id;
|
||||
const object2 = {};
|
||||
object2.threadId = a0.id;
|
||||
object2.guildId = guildId;
|
||||
object2.flags = a0.flags;
|
||||
object2.muted = a0.muted;
|
||||
object2.muteConfig = a0.muteConfig;
|
||||
const Date = global.Date;
|
||||
const joinTimestamp = a0.joinTimestamp;
|
||||
const value3 = Object.create(Date.prototype, {constructor: {value: Date}});
|
||||
const date = new Date(joinTimestamp);
|
||||
object2.joinTimestamp = date instanceof Object ? date : value3;
|
||||
binding[id] = object2;
|
||||
handleMutedChange(a0.id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user