529 lines
23 KiB
TypeScript
529 lines
23 KiB
TypeScript
/* Metro module 4791; source: stores/ChannelSectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 4107, 4792, 1379, 1867, 3784, 1934, 3969, 1878, 661, 1386, 482, 4793, 1239, 21, 4140, 566, 694, 2] */
|
|
function _fun41400(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:6, offset: 0x0111ddd7, size: 758 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const parseChannelId = function(a0) {
|
|
var value3;
|
|
var value = null;
|
|
if (value == a0) {
|
|
return value;
|
|
}
|
|
if (isStaticChannelRoute(a0)) {
|
|
value3 = SelectedGuildStore.getGuildId();
|
|
return value == value3 ? value : buildGuildStaticChannelId(a0, value3);
|
|
}
|
|
return a0;
|
|
};
|
|
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 searchMessageStore = importDefault(4792) /* metro dependency 4792: SearchMessageStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_16 = value.ChannelSections;
|
|
const env0_17 = value.ComponentActions;
|
|
value = require(1386) /* metro dependency 1386: ChannelConstants */;
|
|
const env0_18 = value.isStaticChannelRoute;
|
|
const env0_19 = value.buildGuildStaticChannelId;
|
|
const env0_20 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
|
const env0_25 = {};
|
|
const env0_26 = {};
|
|
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
|
value = _fun41408(PersistedStore);
|
|
value.displayName = 'ChannelSectionStore';
|
|
value.persistKey = 'ChannelSectionStore2';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{SIDEBAR_SET_SELECTED_SEARCH_CONTEXT: function(a0) {
|
|
env0_28 = a0.searchContextId;
|
|
return setIsSearchSidebarOpen();
|
|
}, CHANNEL_TOGGLE_MEMBERS_SECTION: CHANNEL_TOGGLE_MEMBERS_SECTION,
|
|
USER_PROFILE_SIDEBAR_TOGGLE_SECTION: USER_PROFILE_SIDEBAR_TOGGLE_SECTION,
|
|
CHANNEL_TOGGLE_SUMMARIES_SECTION: CHANNEL_TOGGLE_SUMMARIES_SECTION,
|
|
CHANNEL_TOGGLE_CONVERSATIONS_SECTION: CHANNEL_TOGGLE_CONVERSATIONS_SECTION,
|
|
CHANNEL_OPEN_CONVERSATIONS_SECTION: CHANNEL_OPEN_CONVERSATIONS_SECTION,
|
|
SIDEBAR_VIEW_CHANNEL: SIDEBAR_VIEW_CHANNEL, SIDEBAR_VIEW_GUILD: SIDEBAR_VIEW_GUILD,
|
|
SIDEBAR_CREATE_THREAD: SIDEBAR_CREATE_THREAD, SIDEBAR_CLOSE: SIDEBAR_CLOSE,
|
|
SIDEBAR_CLOSE_GUILD: SIDEBAR_CLOSE_GUILD, CHANNEL_DELETE: CHANNEL_DELETE_41429,
|
|
CHANNEL_SELECT: CHANNEL_SELECT_41430, THREAD_CREATE: THREAD_CREATE_41431, THREAD_DELETE: THREAD_DELETE_41432});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/ChannelSectionStore.tsx');
|
|
exports.default = value;
|
|
exports.MESSAGE_REQUESTS_BASE_CHANNEL_ID = 'message_requests';
|
|
exports.isViewChannelSidebar = isViewChannelSidebar;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_41401() { // fn#41401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:372, offset: 0x0111e0cd, 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_41401_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function toggleSection(a0) { // fn#41405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:727, offset: 0x0111e16c, size: 92 bytes, params: 2, frame: 14
|
|
var r0;
|
|
const value = a0;
|
|
if (env0_27) {
|
|
r0 = true;
|
|
} else {
|
|
r0 = false;
|
|
}
|
|
const channelId = parseChannelId(SelectedChannelStore.getChannelId());
|
|
if (channelId != null && channelId in env0_25) {
|
|
delete env0_25[channelId];
|
|
r0 = true;
|
|
}
|
|
r0 = r0 && value ? value : !value;
|
|
return r0;
|
|
}
|
|
|
|
function handlePermissionsChange() { // fn#41406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:869, offset: 0x0111e1c8, size: 223 bytes, params: 1, frame: 29
|
|
var r2;
|
|
var r10;
|
|
var r14;
|
|
var r0;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var type;
|
|
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
var VIEW_THREAD;
|
|
var VIEW_CHANNEL;
|
|
var getChannel;
|
|
var channelId;
|
|
var value3;
|
|
var value4;
|
|
var can;
|
|
var value5;
|
|
var value6;
|
|
const binding = env0_25;
|
|
const value2 = false;
|
|
const properties = Object.keys(binding);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties === undefined) {
|
|
r0 = value2;
|
|
} else {
|
|
r2 = value2;
|
|
r10 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r10];
|
|
propertyName2 = r10 + 1;
|
|
if (propertyName === undefined) {
|
|
r0 = r2;
|
|
break reducibleLoop1;
|
|
}
|
|
property = env0_25[propertyName];
|
|
type = property.type;
|
|
VIEW_THREAD = SidebarType.VIEW_THREAD;
|
|
if (type !== VIEW_THREAD) {
|
|
type = property.type;
|
|
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
|
|
reducibleJoin4: while (true) {
|
|
if (type !== VIEW_CHANNEL) {
|
|
r10 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
}
|
|
getChannel = ChannelStore.getChannel;
|
|
channelId = property.channelId;
|
|
value3 = Reflect.apply(getChannel, ChannelStore, [channelId]);
|
|
value4 = value3 != null;
|
|
reducibleJoin6: while (true) {
|
|
if (value4) {
|
|
can = PermissionStore.can;
|
|
VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
value5 = Reflect.apply(can, PermissionStore, [VIEW_CHANNEL, value3]);
|
|
r14 = value5;
|
|
break reducibleJoin6;
|
|
}
|
|
r14 = value4;
|
|
break reducibleJoin6;
|
|
}
|
|
if (r14) {
|
|
r10 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
delete env0_25[propertyName];
|
|
value6 = true;
|
|
r2 = value6;
|
|
r10 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function setIsSearchSidebarOpen() { // fn#41407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1125, offset: 0x0111e2a7, size: 57 bytes, params: 1, frame: 13
|
|
if ((env0_28 != null && SearchMessageStore.hasSearchState(env0_28)) === env0_27) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function _fun41408(a0) { // fn#41408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1222, offset: 0x0111e2e0, size: 237 bytes, params: 2, frame: 16
|
|
const closure = ChannelSectionStore;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: value_41410}, {key: 'getState', value: value_41411},
|
|
{key: 'getSection', value: value_41412}, {key: 'getSidebarState', value: value_41413},
|
|
{key: 'getGuildSidebarState', value: value_41414}, {key: 'getCurrentSidebarChannelId', value: value_41415},
|
|
{key: 'getCurrentSidebarMessageId', value: value_41416}, {key: 'getCurrentSearchContextId',
|
|
value: value_41417}]);
|
|
}
|
|
|
|
function CHANNEL_TOGGLE_MEMBERS_SECTION() { // fn#41419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3319, offset: 0x0111e7d4, size: 131 bytes, params: 1, frame: 12
|
|
var ComponentDispatch;
|
|
if (env0_27) {
|
|
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
|
|
}
|
|
if (env0_22) {
|
|
env0_22 = toggleSection(env0_22);
|
|
}
|
|
if (env0_23) {
|
|
env0_23 = toggleSection(env0_23);
|
|
}
|
|
env0_21 = toggleSection(env0_21);
|
|
}
|
|
|
|
function USER_PROFILE_SIDEBAR_TOGGLE_SECTION() { // fn#41420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3531, offset: 0x0111e857, size: 79 bytes, params: 1, frame: 12
|
|
var ComponentDispatch;
|
|
if (!env0_24) {
|
|
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
|
|
}
|
|
env0_24 = toggleSection(env0_24);
|
|
}
|
|
|
|
function CHANNEL_TOGGLE_SUMMARIES_SECTION() { // fn#41421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3696, offset: 0x0111e8a6, size: 76 bytes, params: 1, frame: 12
|
|
if (env0_21) {
|
|
env0_21 = toggleSection(env0_21);
|
|
}
|
|
if (env0_23) {
|
|
env0_23 = toggleSection(env0_23);
|
|
}
|
|
env0_22 = toggleSection(env0_22);
|
|
}
|
|
|
|
function CHANNEL_TOGGLE_CONVERSATIONS_SECTION() { // fn#41422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:3848, offset: 0x0111e8f2, size: 89 bytes, params: 1, frame: 12
|
|
var ComponentDispatch;
|
|
if (env0_27) {
|
|
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
|
|
}
|
|
env0_23 = toggleSection(env0_23);
|
|
}
|
|
|
|
function CHANNEL_OPEN_CONVERSATIONS_SECTION() { // fn#41423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4027, offset: 0x0111e94b, size: 88 bytes, params: 1, frame: 13
|
|
var r0;
|
|
var ComponentDispatch;
|
|
const binding = env0_23;
|
|
if (binding) {
|
|
r0 = !binding;
|
|
} else {
|
|
if (env0_27) {
|
|
ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
|
|
ComponentDispatch.dispatch(ComponentActions.SEARCH_RESULTS_CLOSE);
|
|
}
|
|
r0 = true;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function SIDEBAR_VIEW_CHANNEL({sidebarType, baseChannelId, channelId, details}) { // fn#41424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4191, offset: 0x0111e9a3, size: 144 bytes, params: 2, frame: 19
|
|
var r2;
|
|
var object3;
|
|
const channelId2 = parseChannelId(baseChannelId);
|
|
if (channelId2 == null) {
|
|
return false;
|
|
}
|
|
const object4 = {type: sidebarType, channelId: channelId, details: details};
|
|
const SidebarType = require(dependencyMap[16]).SidebarType;
|
|
const VIEW_MOD_REPORT = SidebarType.VIEW_MOD_REPORT;
|
|
if (sidebarType !== VIEW_MOD_REPORT) {
|
|
r2 = object4;
|
|
} else {
|
|
object3 = {};
|
|
copyDataProperties(object3, object4, dependencyMap);
|
|
object3['baseChannelId'] = baseChannelId;
|
|
r2 = object3;
|
|
}
|
|
env0_25[channelId2] = r2;
|
|
return true;
|
|
}
|
|
|
|
function SIDEBAR_VIEW_GUILD({sidebarType, guildId, baseChannelId, details}) { // fn#41425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4472, offset: 0x0111ea33, size: 87 bytes, params: 2, frame: 15
|
|
var r0;
|
|
const channelId = parseChannelId(baseChannelId);
|
|
const value2 = channelId != null;
|
|
if (value2) {
|
|
env0_26[guildId] = {type: sidebarType, baseChannelId: channelId, guildId: guildId, details: details};
|
|
r0 = true;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function SIDEBAR_CREATE_THREAD({parentChannelId, parentMessageId, location}) { // fn#41426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4680, offset: 0x0111ea8a, size: 108 bytes, params: 2, frame: 18
|
|
var binding;
|
|
var object2;
|
|
const channelId = parseChannelId(parentChannelId);
|
|
if (channelId != null) {
|
|
binding = env0_25;
|
|
object2 = {};
|
|
object2.type = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType.CREATE_THREAD;
|
|
object2.parentChannelId = parentChannelId;
|
|
object2.parentMessageId = parentMessageId;
|
|
object2.location = location;
|
|
binding[channelId] = object2;
|
|
}
|
|
}
|
|
|
|
function SIDEBAR_CLOSE({baseChannelId}) { // fn#41427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:4907, offset: 0x0111eaf6, size: 39 bytes, params: 2, frame: 12
|
|
const channelId = parseChannelId(baseChannelId);
|
|
if (channelId != null) {
|
|
delete env0_25[channelId];
|
|
}
|
|
}
|
|
|
|
function SIDEBAR_CLOSE_GUILD({guildId}) { // fn#41428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5020, offset: 0x0111eb1d, size: 40 bytes, params: 2, frame: 4
|
|
var r0;
|
|
const value2 = env0_26[guildId] != null;
|
|
if (value2) {
|
|
delete env0_26[guildId];
|
|
r0 = true;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function CHANNEL_DELETE_41429({channel}) { // fn#41429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5118, offset: 0x0111eb45, size: 171 bytes, params: 2, frame: 28
|
|
var r3;
|
|
var r10;
|
|
var r14;
|
|
var r2;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var value4;
|
|
var type;
|
|
var SidebarType;
|
|
var VIEW_CHANNEL;
|
|
var value5;
|
|
var channelId;
|
|
var value6;
|
|
var value7;
|
|
let id = channel.id;
|
|
const value2 = id in env0_25;
|
|
const binding = env0_25;
|
|
if (value2) {
|
|
delete binding[channel.id];
|
|
return true;
|
|
}
|
|
const properties = Object.keys(binding);
|
|
const properties3 = properties.length;
|
|
if (properties === undefined) {
|
|
r2 = false;
|
|
} else {
|
|
r3 = false;
|
|
r10 = 0;
|
|
while (true) {
|
|
propertyName = properties[r10];
|
|
propertyName2 = r10 + 1;
|
|
if (propertyName === undefined) {
|
|
r2 = r3;
|
|
break;
|
|
}
|
|
property = env0_25[propertyName];
|
|
value4 = property != null;
|
|
if (!value4) {
|
|
r14 = value4;
|
|
continue;
|
|
}
|
|
type = property.type;
|
|
SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
VIEW_CHANNEL = SidebarType.VIEW_CHANNEL;
|
|
value5 = type === VIEW_CHANNEL;
|
|
r14 = value5;
|
|
if (!r14) {
|
|
continue;
|
|
}
|
|
channelId = property.channelId;
|
|
id = channel.id;
|
|
value6 = channelId === id;
|
|
r14 = value6;
|
|
if (!r14) {
|
|
r10 = propertyName2;
|
|
continue;
|
|
}
|
|
delete env0_25[propertyName];
|
|
value7 = true;
|
|
r3 = value7;
|
|
r10 = propertyName2;
|
|
}
|
|
}
|
|
return r2;
|
|
}
|
|
|
|
function CHANNEL_SELECT_41430() { // fn#41430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5351, offset: 0x0111ebf0, size: 57 bytes, params: 1, frame: 12
|
|
if ((require(4140) /* metro dependency 4140: PlatformUtils */).isMobile && env0_21) {
|
|
}
|
|
}
|
|
|
|
function THREAD_CREATE_41431({channel}) { // fn#41431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5436, offset: 0x0111ec29, size: 236 bytes, params: 2, frame: 17
|
|
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
var parentMessageId;
|
|
var defaultImport;
|
|
if (channel.ownerId === UserStore.getCurrentUser()?.id) {
|
|
return false;
|
|
}
|
|
const property = env0_25[channel.parent_id];
|
|
let r1 = property != null && property.type === SidebarType.CREATE_THREAD;
|
|
if (r1) {
|
|
parentMessageId = property.parentMessageId;
|
|
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
r1 = parentMessageId === defaultImport.castChannelIdAsMessageId(channel.id);
|
|
}
|
|
if (r1) {
|
|
env0_25[channel.parent_id] = {type: SidebarType.VIEW_THREAD, channelId: channel.id};
|
|
}
|
|
}
|
|
|
|
function THREAD_DELETE_41432({channel}) { // fn#41432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:5773, offset: 0x0111ed15, size: 108 bytes, params: 2, frame: 15
|
|
const property = env0_25[channel.parent_id];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const type = property.type;
|
|
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
const VIEW_THREAD = SidebarType.VIEW_THREAD;
|
|
if (type !== VIEW_THREAD) {
|
|
return false;
|
|
}
|
|
if (property.channelId !== channel.id) {
|
|
return false;
|
|
}
|
|
delete env0_25[channel.parent_id];
|
|
}
|
|
|
|
function isViewChannelSidebar({type}) { // fn#41433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:6100, offset: 0x0111ed81, size: 140 bytes, params: 2, frame: 14
|
|
const {VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST,
|
|
VIEW_MOD_REPORT} = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
return [VIEW_CHANNEL, VIEW_THREAD, VIEW_MESSAGE_REQUEST, VIEW_MOD_REPORT].includes(type);
|
|
}
|
|
|
|
function value_41410(a0) { // fn#41410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1547, offset: 0x0111e43e, size: 215 bytes, params: 2, frame: 25
|
|
var r3;
|
|
var r0;
|
|
var isMembersOpen;
|
|
var value;
|
|
var isSummariesOpen;
|
|
var isProfileOpen;
|
|
if (a0 != null) {
|
|
isMembersOpen = a0.isMembersOpen;
|
|
value = isMembersOpen != null;
|
|
r3 = value && isMembersOpen;
|
|
value = environment.__proto__;
|
|
isSummariesOpen = a0.isSummariesOpen;
|
|
r3 = isSummariesOpen != null && isSummariesOpen;
|
|
isProfileOpen = a0.isProfileOpen;
|
|
r3 = isProfileOpen == null || isProfileOpen;
|
|
r3 = a0.sidebars ?? ({});
|
|
r0 = a0.guildSidebars ?? ({});
|
|
}
|
|
const syncWith = this.syncWith;
|
|
value = environment.__proto__;
|
|
Reflect.apply(syncWith, this, [[SearchMessageStore], setIsSearchSidebarOpen]);
|
|
this.syncWith([PermissionStore], handlePermissionsChange);
|
|
this.waitFor(ChannelStore, ExperimentStore, GuildStore, PermissionStore, SearchMessageStore, SelectedChannelStore,
|
|
SelectedGuildStore, UserStore);
|
|
}
|
|
|
|
function value_41411() { // fn#41411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:1879, offset: 0x0111e515, size: 52 bytes, params: 1, frame: 3
|
|
return {isMembersOpen: env1_21, isSummariesOpen: env1_22, isProfileOpen: env1_24, sidebars: env1_25,
|
|
guildSidebars: env1_26};
|
|
}
|
|
|
|
function value_41412(a0, a1) { // fn#41412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2001, offset: 0x0111e549, size: 159 bytes, params: 3, frame: 12
|
|
if (env1_27) {
|
|
return ChannelSections.SEARCH;
|
|
}
|
|
const channelId = parseChannelId(a0);
|
|
return channelId == null ? a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE : env1_25[channelId] != null ? ChannelSections.SIDEBAR_CHAT : a1 && env1_24 ? ChannelSections.PROFILE : env1_22 ? ChannelSections.SUMMARIES : env1_21 ? ChannelSections.MEMBERS : env1_23 ? ChannelSections.CONVERSATIONS : ChannelSections.NONE;
|
|
}
|
|
|
|
function value_41413(a0) { // fn#41413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2199, offset: 0x0111e5e8, size: 36 bytes, params: 2, frame: 12
|
|
const parseChannelIdBinding = parseChannelId;
|
|
const value2 = undefined;
|
|
const channelId = parseChannelIdBinding(a0);
|
|
return channelId == null ? value2 : env1_25[channelId];
|
|
}
|
|
|
|
function value_41414(a0) { // fn#41414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2298, offset: 0x0111e60c, size: 27 bytes, params: 2, frame: 3
|
|
return a0 == null ? undefined : env1_26[a0];
|
|
}
|
|
|
|
function value_41415(a0) { // fn#41415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2379, offset: 0x0111e627, size: 189 bytes, params: 2, frame: 17
|
|
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
const channelId2 = parseChannelId(a0);
|
|
const value2 = null;
|
|
if (value2 == channelId2) {
|
|
return value2;
|
|
}
|
|
if (env1_27) {
|
|
return value2;
|
|
}
|
|
const property = env1_25[channelId2];
|
|
return value2 == property ? value2 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? property.channelId : property.type !== SidebarType.VIEW_MOD_REPORT ? value2 : property.channelId;
|
|
}
|
|
|
|
function value_41416(a0) { // fn#41416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4969:2678, offset: 0x0111e6e4, size: 210 bytes, params: 2, frame: 17
|
|
const SidebarType = (require(4793) /* metro dependency 4793: SidebarActionTypes */).SidebarType;
|
|
const parseChannelIdBinding = parseChannelId;
|
|
const value2 = undefined;
|
|
const channelId = parseChannelIdBinding(a0);
|
|
const value3 = null;
|
|
if (value3 == channelId) {
|
|
return value3;
|
|
}
|
|
if (env1_27) {
|
|
return value3;
|
|
}
|
|
const property = env1_25[channelId];
|
|
return value3 == property ? value3 : property.type === SidebarType.VIEW_THREAD || property.type === SidebarType.VIEW_CHANNEL ? value3 == property.details ? value2 : property.details.initialMessageId : property.type !== SidebarType.VIEW_MOD_REPORT ? value3 : value3 == property.details ? value2 : property.details.initialMessageId;
|
|
}
|
|
|