Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,37 @@
|
||||
/* Metro module 11392; source: modules/channel_permissions/native/ChannelPermissionsUtils.tsx; dependencies: [661, 683, 4080, 9095, 1962, 11393, 2] */
|
||||
function _fun87309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:6, offset: 0x01fb7d53, size: 137 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/ChannelPermissionsUtils.tsx');
|
||||
exports.openAddMembersActionSheet = openAddMembersActionSheet;
|
||||
exports.openChannelMembersActionSheet = openChannelMembersActionSheet;
|
||||
}
|
||||
|
||||
function openAddMembersActionSheet(a0) { // fn#87310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:245, offset: 0x01fb7ddc, size: 171 bytes, params: 2, frame: 21
|
||||
let value = a1;
|
||||
const r6 = value !== undefined ? value : false;
|
||||
const defaultImport = importDefault(dependencyMap[1]);
|
||||
const track = defaultImport.track;
|
||||
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Grant Channel Access'}]);
|
||||
const defaultImport2 = importDefault(dependencyMap[2]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
value = require(dependencyMap[4]);
|
||||
value = value(dependencyMap[3], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport2, [value, 'channel-add-members-' + a0.id, {channel: a0, canSkip: r6}]);
|
||||
}
|
||||
|
||||
function openChannelMembersActionSheet(a0, a1) { // fn#87311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11578:472, offset: 0x01fb7e87, size: 159 bytes, params: 3, frame: 20
|
||||
const defaultImport = importDefault(dependencyMap[1]);
|
||||
const track = defaultImport.track;
|
||||
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
||||
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Manage Channel Access'}]);
|
||||
const defaultImport2 = importDefault(dependencyMap[2]);
|
||||
const openLazy = defaultImport2.openLazy;
|
||||
let value = require(dependencyMap[4]);
|
||||
value = value(dependencyMap[5], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport2, [value, 'channel-members-' + a0, {channelId: a0, guildId: a1}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,675 @@
|
||||
/* Metro module 9095; source: modules/channel_permissions/native/action_sheets/AddMembersActionSheet.tsx; dependencies: [5, 29, 57, 31, 27, 1945, 1938, 1867, 1878, 8120, 1309, 482, 33, 4501, 697, 3789, 5463, 4100, 566, 9088, 3869, 1244, 1305, 4573, 9096, 6277, 8416, 9100, 6592, 9105, 4805, 4800, 9089, 3856, 4080, 6275, 6758, 4578, 2] */
|
||||
function _fun71141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:6, offset: 0x01d15f9c, size: 709 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const getFullRowId = function({rowType, id}) {
|
||||
return '' + rowType + ':' + id;
|
||||
};
|
||||
const closure = AddMembersBody;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_6 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_7 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_8 = value.View;
|
||||
const env0_9 = value.ScrollView;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
value = require(8120) /* metro dependency 8120: ChannelPermissionsConstants */;
|
||||
const env0_14 = value.RowType;
|
||||
const env0_15 = value.MEMBER_REQUEST_COUNT;
|
||||
const FORM_ROW_VERTICAL_PADDING = (require(1309) /* metro dependency 1309: FormConstants */).FORM_ROW_VERTICAL_PADDING;
|
||||
const env0_16 = (require(482) /* metro dependency 482: Constants */).Permissions;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_17 = value.jsx;
|
||||
const env0_18 = value.Fragment;
|
||||
const env0_19 = value.jsxs;
|
||||
const env0_20 = FORM_ROW_VERTICAL_PADDING + 30;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
object2.container = {flex: 1};
|
||||
const object5 = {alignItems: 'stretch'};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object5.paddingTop = PX_12;
|
||||
object2.inputContainer = object5;
|
||||
object2.tagRoleColor = {'height': 12, 'width': 12, 'borderRadius': 6};
|
||||
const object6 = {'width': 16, 'height': 16};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object2.tagAvatar = object6;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.emptyState = {paddingTop: PX_16};
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.emptyStateText = {color: TEXT_DEFAULT};
|
||||
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.sectionRowWrapper = {paddingVertical: PX_12};
|
||||
object2.adminWarning = {'marginHorizontal': 16, 'marginVertical': 8};
|
||||
const env0_21 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/action_sheets/AddMembersActionSheet.tsx');
|
||||
exports.default = AddMembersActionSheet;
|
||||
exports.AddMembersBody = closure;
|
||||
}
|
||||
|
||||
function AddMembersBody(a0) { // fn#71144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:1267, offset: 0x01d1628d, size: 1954 bytes, params: 2, frame: 44
|
||||
var r0;
|
||||
var r13;
|
||||
var r5;
|
||||
var rolesRows;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var object4;
|
||||
var space;
|
||||
var PX_16;
|
||||
var EmptyState;
|
||||
const channel = a0.channel;
|
||||
const guild = a0.guild;
|
||||
const pendingAdditions = a0.pendingAdditions;
|
||||
const env0_2 = a0.setPendingAdditions;
|
||||
const permission = a0.permission;
|
||||
const r15 = permission !== undefined ? permission : (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
|
||||
const inActionSheet = a0.inActionSheet;
|
||||
let object = {'channel': 0, 'guild': 0, 'pendingAdditions': 0, 'setPendingAdditions': 0, 'permission': 0,
|
||||
'inActionSheet': 0};
|
||||
silentSetPrototypeOf(object, null, undefined);
|
||||
let value = 0;
|
||||
const value2 = copyDataProperties({}, a0, object, undefined);
|
||||
const env0_6 = undefined;
|
||||
let env0_7 = undefined;
|
||||
const AddMembersBodyGetQuery = function(a0, a1) {
|
||||
var r0;
|
||||
var value = a0;
|
||||
if (a1) {
|
||||
value = value.slice(1);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const closure = AddMembersBodyFilterByQuery;
|
||||
const styles = useStyles();
|
||||
const value5 = env0_6(env0_7.useState(false), 2);
|
||||
const property = value5[value];
|
||||
const value6 = 1;
|
||||
const env0_5 = value5[value6];
|
||||
const value8 = env0_6(env0_7.useState(''), 2);
|
||||
const property2 = value8[value];
|
||||
env0_7 = value8[value6];
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: !inActionSheet}).insets;
|
||||
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
const canEveryoneRole = permissionUtilsModule.canEveryoneRole;
|
||||
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
|
||||
const canEveryoneRole2 = Reflect.apply(canEveryoneRole, permissionUtilsModule, [ADMINISTRATOR, guild]);
|
||||
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
|
||||
function() {
|
||||
return GuildRoleStore.getSortedRoles(guild.id);
|
||||
});
|
||||
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
|
||||
function() {
|
||||
return GuildMemberStore.getMemberIds(guild.id);
|
||||
});
|
||||
if (property) {
|
||||
r13 = [];
|
||||
} else {
|
||||
rolesRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getRolesRows(guild,
|
||||
sortedRoles,
|
||||
channel, r15, closure);
|
||||
r0 = value === rolesRows.length && property2.trim() === '';
|
||||
r0 = r0 && value6 === sortedRoles.length;
|
||||
r13 = r0 ? (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getNoRolesRow() : rolesRows;
|
||||
}
|
||||
const membersRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getMembersRows(value9,
|
||||
channel, guild, r15, closure);
|
||||
env0_7.useEffect(_fun71149, [r13.length + membersRows.length, property2]);
|
||||
object = [];
|
||||
r0 = r13.length > value ? [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])] : [];
|
||||
const items3 = [];
|
||||
arraySpread(items3, membersRows, arraySpread(items3,
|
||||
membersRows.length > value ? [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])] : [],
|
||||
arraySpread(items3, r13, arraySpread(items3, r0, value, r15), r15), r15), r15);
|
||||
let r7 = r13.length > value ? value6 : value;
|
||||
const value21 = r7 + r13.length - value6;
|
||||
const env0_12 = (membersRows.length > value ? value21 + 2 : value21) + membersRows.length - value6;
|
||||
let push = object.push;
|
||||
const object5 = {};
|
||||
object5.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/']);
|
||||
object5.data = r13;
|
||||
Reflect.apply(push, object, [object5]);
|
||||
push = object.push;
|
||||
const object6 = {};
|
||||
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
|
||||
object6.data = membersRows;
|
||||
Reflect.apply(push, object, [object6]);
|
||||
let Object = global.Object;
|
||||
const value24 = Object.values(pendingAdditions).map(function({display, row}) {
|
||||
var r2;
|
||||
var object = {};
|
||||
copyDataProperties(object, display, r2);
|
||||
object['id'] = row.id;
|
||||
return object;
|
||||
});
|
||||
const r8 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetScrollView : ScrollView;
|
||||
const flashListModule = require(8416) /* metro dependency 8416: flashList */;
|
||||
r7 = inActionSheet ? flashListModule.BottomSheetFlashList : flashListModule.FlashList;
|
||||
const jsxRuntimeEnv0_18Binding = jsxRuntimeEnv0_18;
|
||||
const TagListInputNative = importDefault(9100) /* metro dependency 9100: TagListInputNative */;
|
||||
const tagListInputNativeProps = {accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])};
|
||||
const string = intl.string;
|
||||
const TVZdKh = (require(1244) /* metro dependency 1244: indexNative */).t.TVZdKh;
|
||||
tagListInputNativeProps.placeholder = Reflect.apply(string, intl, [TVZdKh]);
|
||||
tagListInputNativeProps.tags = value24;
|
||||
tagListInputNativeProps.onChangeText = onChangeText;
|
||||
tagListInputNativeProps.onRemove = function(a0) {
|
||||
var Object = global.Object;
|
||||
var env0_0 = Object.keys(pendingAdditions)[a0];
|
||||
setPendingAdditions(_fun71153);
|
||||
};
|
||||
const view = <View style={styles.inputContainer}><TagListInputNative {...tagListInputNativeProps} /></View>;
|
||||
const r20 = canEveryoneRole2 && <View style={styles.adminWarning}>{((HelpMessage) => <HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5f3HIC'])}</HelpMessage>)((require(1305) /* metro dependency 1305: native */).HelpMessage)}</View>;
|
||||
if (property2 === '') {
|
||||
var r7Props = {...value2};
|
||||
r7Props['estimatedItemSize'] = env0_20;
|
||||
r7Props['extraData'] = pendingAdditions;
|
||||
r7Props['data'] = items3;
|
||||
object4 = {};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingBottom = PX_16 + insets.bottom;
|
||||
r7Props['contentContainerStyle'] = object4;
|
||||
r7Props['renderItem'] = AddMembersBodyRenderRow;
|
||||
r7Props['keyboardShouldPersistTaps'] = 'handled';
|
||||
r5 = ((Component) => <Component {...r7Props} />)(r7);
|
||||
} else if (value !== r13.length) {
|
||||
var r7Props = {...value2};
|
||||
r7Props['estimatedItemSize'] = env0_20;
|
||||
r7Props['extraData'] = pendingAdditions;
|
||||
r7Props['data'] = items3;
|
||||
object4 = {};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingBottom = PX_16 + insets.bottom;
|
||||
r7Props['contentContainerStyle'] = object4;
|
||||
r7Props['renderItem'] = AddMembersBodyRenderRow;
|
||||
r7Props['keyboardShouldPersistTaps'] = 'handled';
|
||||
r5 = ((Component) => <Component {...r7Props} />)(r7);
|
||||
} else if (value === membersRows.length) {
|
||||
var r8Props = {...value2};
|
||||
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
value = <EmptyState Illustration={(require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt} style={styles.emptyState} bodyStyle={styles.emptyStateText} body={intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ErpIY3,
|
||||
|
||||
{query: property2})} />;
|
||||
value = ((Component) => <Component {...r8Props}>{value}</Component>)(r8);
|
||||
r5 = value;
|
||||
} else {
|
||||
var r7Props = {...value2};
|
||||
r7Props['estimatedItemSize'] = env0_20;
|
||||
r7Props['extraData'] = pendingAdditions;
|
||||
r7Props['data'] = items3;
|
||||
object4 = {};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_16 = space.PX_16;
|
||||
object4.paddingBottom = PX_16 + insets.bottom;
|
||||
r7Props['contentContainerStyle'] = object4;
|
||||
r7Props['renderItem'] = AddMembersBodyRenderRow;
|
||||
r7Props['keyboardShouldPersistTaps'] = 'handled';
|
||||
r5 = ((Component) => <Component {...r7Props} />)(r7);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
{r20}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function AddMembersActionSheet({channel, canSkip}) { // fn#71158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4626, offset: 0x01d16f6b, size: 671 bytes, params: 2, frame: 34
|
||||
var r10;
|
||||
var object;
|
||||
var object5;
|
||||
const styles = useStyles();
|
||||
const [property, property2] = env0_6(env0_7.useState({}), 2);
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun71163);
|
||||
const r16 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel, true) ?? '';
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
const Object = global.Object;
|
||||
const value6 = Object.keys(property).length === 0;
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const object6 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6);
|
||||
object6.subtitle = r16;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
if (canSkip) {
|
||||
if (value6) {
|
||||
object5 = {size: 'sm'};
|
||||
object5.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd']);
|
||||
object5.onPress = onPress_71164;
|
||||
object5.variant = 'secondary';
|
||||
r10 = object5;
|
||||
} else {
|
||||
object = {size: 'sm'};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk);
|
||||
object.onPress = function() {
|
||||
return _handleAddPressed.apply(this, arguments);
|
||||
};
|
||||
object.variant = value6 ? 'secondary' : 'primary';
|
||||
object.disabled = value6;
|
||||
r10 = object;
|
||||
}
|
||||
} else {
|
||||
object = {size: 'sm'};
|
||||
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.OYkgVk);
|
||||
object.onPress = onPress_71165;
|
||||
object.variant = value6 ? 'secondary' : 'primary';
|
||||
object.disabled = value6;
|
||||
r10 = object;
|
||||
}
|
||||
object6.trailing = <Button {...r10} />;
|
||||
return (
|
||||
<BottomSheet
|
||||
scrollable
|
||||
header={<BottomSheetTitleHeader {...object6} />}
|
||||
startExpanded
|
||||
>
|
||||
<View style={styles.container}>
|
||||
<AddMembersBody
|
||||
channel={channel}
|
||||
guild={guild}
|
||||
permission={channel.accessPermissions}
|
||||
pendingAdditions={property}
|
||||
setPendingAdditions={property2}
|
||||
inActionSheet
|
||||
/>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function AddMembersBodyFilterByQuery(a0) { // fn#71146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:1632, owner: AddMembersBody.filterByQuery, offset: 0x01d16a4a, size: 134 bytes, params: 2, frame: 16
|
||||
let value = AddMembersBodyGetQuery(env0_6.trim(), env0_4);
|
||||
const RegExp = global.RegExp;
|
||||
value = (importDefault(4100) /* metro dependency 4100: RegexUtils */).escape(value);
|
||||
value = '' + value;
|
||||
const value4 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
|
||||
const regExp = new RegExp(value, 'i');
|
||||
return (regExp instanceof Object ? regExp : value4).test(a0);
|
||||
}
|
||||
|
||||
function _fun71149() { // fn#71149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:2092, offset: 0x01d16b10, size: 126 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var AccessibilityAnnouncer;
|
||||
var announce;
|
||||
var intl;
|
||||
if (env0_6 !== '') {
|
||||
value2 = environment.__proto__;
|
||||
AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
|
||||
announce = AccessibilityAnnouncer.announce;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
Reflect.apply(announce, AccessibilityAnnouncer,
|
||||
[intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ZGVL3g,
|
||||
{count: env0_8}),
|
||||
'polite']);
|
||||
}
|
||||
}
|
||||
|
||||
function AddMembersBodyOnChangeText(a0) { // fn#71151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:2955, owner: AddMembersBody.onChangeText, offset: 0x01d16bb6, size: 118 bytes, params: 2, frame: 20
|
||||
let value = a0.trim();
|
||||
const value3 = value.charAt(0) === '@';
|
||||
const defaultImport = importDefault(6592) /* metro dependency 6592: GuildUtils */;
|
||||
const requestMembers = defaultImport.requestMembers;
|
||||
const id = guild.id;
|
||||
value = AddMembersBodyGetQuery(value, value3);
|
||||
Reflect.apply(requestMembers, defaultImport, [id, value, MEMBER_REQUEST_COUNT]);
|
||||
env0_7(a0);
|
||||
env0_5(value3);
|
||||
}
|
||||
|
||||
function AddMembersBodyOnRemove(a0) { // fn#71152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3069, owner: AddMembersBody.onRemove, offset: 0x01d16c2c, size: 58 bytes, params: 2, frame: 13
|
||||
const Object = global.Object;
|
||||
const env0_0 = Object.keys(pendingAdditions)[a0];
|
||||
setPendingAdditions(_fun71153);
|
||||
}
|
||||
|
||||
function AddMembersBodyRenderRow({item, index}) { // fn#71154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3719, owner: AddMembersBody.renderRow, offset: 0x01d16c9b, size: 256 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
var r8;
|
||||
var r0;
|
||||
var value;
|
||||
var ChannelOverwritesCheckboxItem;
|
||||
var object2;
|
||||
if (typeof item === 'string') {
|
||||
value = environment.__proto__;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = <Text style={styles.sectionRowWrapper} maxFontSizeMultiplier={2} accessibilityRole="header" variant="text-sm/semibold" color="interactive-text-default">{item}</Text>;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
ChannelOverwritesCheckboxItem = (require(9096) /* metro dependency 9096: ChannelOverwritesItem */).ChannelOverwritesCheckboxItem;
|
||||
object2 = {};
|
||||
r8 = env0_9 === index || env0_11 === index;
|
||||
object2.start = r8;
|
||||
r8 = env0_10 === index || env0_12 === index;
|
||||
object2.end = r8;
|
||||
object2.item = item;
|
||||
object2.guildId = guild.id;
|
||||
object2.onPress = function() {
|
||||
_fun71156(item);
|
||||
};
|
||||
value = getFullRowId(item);
|
||||
object2.checked = value in pendingAdditions;
|
||||
value = <ChannelOverwritesCheckboxItem {...object2} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _handleAddPressed() { // fn#71159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4872, owner: AddMembersActionSheet._handleAddPressed, offset: 0x01d1720a, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
return env1_4(_fun71161).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun71163() { // fn#71163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4768, offset: 0x01d1741a, size: 52 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return GuildStore.getGuild(channel?.getGuildId());
|
||||
}
|
||||
|
||||
function AddMembersActionSheetOnPress() { // fn#71164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:5628, owner: AddMembersActionSheet.onPress, offset: 0x01d1744e, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun71153(a0) { // fn#71153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:3108, offset: 0x01d16c66, size: 53 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
a0[binding];
|
||||
const value = environment.__proto__.__proto__;
|
||||
const binding2 = env2_5;
|
||||
const items2 = [binding];
|
||||
return binding2(a0, items2.map(_toPropertyKey_71142));
|
||||
}
|
||||
|
||||
function renderRowOnPress() { // fn#71155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4056, owner: AddMembersBody.renderRow.onPress, offset: 0x01d16d9b, size: 25 bytes, params: 1, frame: 11
|
||||
onPressUpdatePendingAdditions(item);
|
||||
}
|
||||
|
||||
function* _fun71161() { // fn#71161, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4929, offset: 0x01d1724a, size: 212 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var binding;
|
||||
var binding2;
|
||||
var property;
|
||||
var value5;
|
||||
var savePermissionUpdates;
|
||||
var id;
|
||||
var value6;
|
||||
var binding3;
|
||||
var memberOrRoleAddedToast;
|
||||
var binding4;
|
||||
var hideActionSheet;
|
||||
var error;
|
||||
if (true) {
|
||||
var items2 = [];
|
||||
var env0_1 = 0;
|
||||
var env0_2 = 0;
|
||||
var Object = global.Object;
|
||||
var values = Object.values;
|
||||
value = environment.__proto__.__proto__;
|
||||
Reflect.apply(values, Object, [importDefault]).forEach(_fun71162);
|
||||
try {
|
||||
binding = env3_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding2 = env3_3;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding2[32];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value5 = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
savePermissionUpdates = value5.savePermissionUpdates;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
id = require.id;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = Reflect.apply(savePermissionUpdates, value5, [id, items2]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
yield value;
|
||||
try {
|
||||
value = undefined;
|
||||
value6 = false;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
if (value6) {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
binding = env3_0;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding3 = env3_3;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[33];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
memberOrRoleAddedToast = value.memberOrRoleAddedToast;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env0_2;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding4 = env0_1;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(memberOrRoleAddedToast, value, [binding, binding4]);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
binding = env3_1;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
property = binding3[34];
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
value = binding(property);
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
hideActionSheet = value.hideActionSheet;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
}
|
||||
try {
|
||||
Reflect.apply(hideActionSheet, value, []);
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onPressUpdatePendingAdditions(a0) { // fn#71156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4060, owner: AddMembersBody.renderRow.onPress.updatePendingAdditions, offset: 0x01d16db4, size: 57 bytes, params: 2, frame: 11
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const rowType = a0.rowType;
|
||||
const EMPTY_STATE = RowType.EMPTY_STATE;
|
||||
if (rowType !== EMPTY_STATE) {
|
||||
value = environment.__proto__.__proto__;
|
||||
setPendingAdditions(_fun71157);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun71162({row}) { // fn#71162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4984, offset: 0x01d1731e, size: 252 bytes, params: 2, frame: 17
|
||||
var rowType;
|
||||
var binding;
|
||||
var push;
|
||||
var permissionOverwriteForUser;
|
||||
var value3;
|
||||
var permissionOverwriteForRole;
|
||||
var value5;
|
||||
let id = row.id;
|
||||
let value = id != null;
|
||||
if (value && row.id !== '') {
|
||||
rowType = row.rowType;
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
if (rowType === env4_14.ROLE) {
|
||||
binding = env0_2;
|
||||
env0_2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
binding = env0_0;
|
||||
push = binding.push;
|
||||
value = env4_0(env4_3[31]);
|
||||
permissionOverwriteForRole = value.permissionOverwriteForRole;
|
||||
id = row.id;
|
||||
value5 = environment.__proto__.__proto__.__proto__;
|
||||
Reflect.apply(push, binding, [Reflect.apply(permissionOverwriteForRole, value, [id, require.type])]);
|
||||
} else if (row.rowType === env4_14.MEMBER) {
|
||||
binding = env0_1;
|
||||
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
binding = env0_0;
|
||||
push = binding.push;
|
||||
value = env4_0(env4_3[31]);
|
||||
permissionOverwriteForUser = value.permissionOverwriteForUser;
|
||||
id = row.id;
|
||||
value3 = environment.__proto__.__proto__.__proto__;
|
||||
Reflect.apply(push, binding, [Reflect.apply(permissionOverwriteForUser, value, [id, require.type])]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun71157(a0) { // fn#71157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9280:4125, offset: 0x01d16ded, size: 382 bytes, params: 2, frame: 21
|
||||
var r4;
|
||||
var rowType;
|
||||
var value5;
|
||||
var object5;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
var object6;
|
||||
var tagAvatar;
|
||||
var object7;
|
||||
var binding;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, a0, undefined);
|
||||
const getFullRowIdBinding = getFullRowId;
|
||||
const value3 = undefined;
|
||||
const fullRowIdBinding = getFullRowIdBinding(env0_0);
|
||||
if (fullRowIdBinding in object8) {
|
||||
delete object8[fullRowIdBinding];
|
||||
} else {
|
||||
rowType = env0_0.rowType;
|
||||
if (RowType.ROLE === rowType) {
|
||||
object7 = {};
|
||||
binding = env0_0;
|
||||
object7.text = binding.name;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
object7.icon = <View style={[styles.tagRoleColor, {backgroundColor: binding.colorString}]} />;
|
||||
r4 = object7;
|
||||
} else if (RowType.ADMINISTRATOR === rowType) {
|
||||
object7 = {};
|
||||
binding = env0_0;
|
||||
object7.text = binding.name;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
object7.icon = <View style={[styles.tagRoleColor, {backgroundColor: binding.colorString}]} />;
|
||||
r4 = object7;
|
||||
} else if (RowType.MEMBER === rowType) {
|
||||
value5 = UserStore.getUser(env0_0.id);
|
||||
if (value5 != null) {
|
||||
object5 = {};
|
||||
object5.text = env0_0.name;
|
||||
object6 = {user: value5};
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
object6.guildId = guild.id;
|
||||
tagAvatar = styles.tagAvatar;
|
||||
object6.avatarStyle = tagAvatar;
|
||||
tagAvatar = styles.tagAvatar;
|
||||
object6.style = tagAvatar;
|
||||
object5.icon = <Avatar {...object6} />;
|
||||
r4 = object5;
|
||||
} else {
|
||||
r4 = value3;
|
||||
}
|
||||
} else if (RowType.OWNER !== rowType) {
|
||||
r4 = value3;
|
||||
} else {
|
||||
value5 = UserStore.getUser(env0_0.id);
|
||||
if (value5 != null) {
|
||||
object5 = {};
|
||||
object5.text = env0_0.name;
|
||||
object6 = {user: value5};
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
object6.guildId = guild.id;
|
||||
tagAvatar = styles.tagAvatar;
|
||||
object6.avatarStyle = tagAvatar;
|
||||
tagAvatar = styles.tagAvatar;
|
||||
object6.style = tagAvatar;
|
||||
object5.icon = <Avatar {...object6} />;
|
||||
r4 = object5;
|
||||
} else {
|
||||
r4 = value3;
|
||||
}
|
||||
}
|
||||
if (r4 != null) {
|
||||
object8[fullRowIdBinding] = {display: r4, row: env0_0};
|
||||
}
|
||||
}
|
||||
return object8;
|
||||
}
|
||||
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
/* Metro module 11393; source: modules/channel_permissions/native/action_sheets/ChannelMembersActionSheet.tsx; dependencies: [31, 27, 1379, 1945, 1938, 1867, 3784, 661, 33, 4501, 697, 1585, 566, 1484, 4805, 9088, 1244, 6275, 6758, 5278, 4080, 8148, 11394, 7002, 7975, 11392, 10859, 1305, 6277, 9096, 4573, 2] */
|
||||
function _fun87312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:6, offset: 0x01fb7f26, size: 380 bytes, params: 8, frame: 21
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_9 = value.ChannelSettingsSections;
|
||||
const env0_10 = value.Permissions;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value.jsx;
|
||||
const env0_12 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const env0_13 = Reflect.apply(createStyles, value, [{container: {'paddingHorizontal': 16, 'flex': 1},
|
||||
sectionRowWrapper: {paddingVertical: PX_12}, warning: {'margin': 16, 'marginBottom': 0}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/action_sheets/ChannelMembersActionSheet.tsx');
|
||||
exports.default = ChannelMembersActionSheet;
|
||||
}
|
||||
|
||||
function ChannelMembersActionSheet({channelId, guildId}) { // fn#87313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:531, offset: 0x01fb80a2, size: 1293 bytes, params: 2, frame: 34
|
||||
var r7;
|
||||
var r9;
|
||||
var PressableOpacity;
|
||||
var object5;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const {guild,
|
||||
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
|
||||
GuildRoleStore], _fun87315, [channel]);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildMemberStore],
|
||||
_fun87316, [channel]);
|
||||
const env0_4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
if (sortedGuildRoles == null) {
|
||||
return null;
|
||||
}
|
||||
const can = PermissionStore.can;
|
||||
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
|
||||
const value6 = Reflect.apply(can, PermissionStore, [MANAGE_ROLES, channel]);
|
||||
const existingRolesRows = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingRolesRows(guild,
|
||||
sortedGuildRoles, channel, channel.accessPermissions);
|
||||
const existingMembersRows = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembersRows(value4,
|
||||
channel, guild, channel.accessPermissions);
|
||||
items2 = [];
|
||||
let push = items2.push;
|
||||
const object4 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object4.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/']]);
|
||||
object4.data = existingRolesRows;
|
||||
Reflect.apply(push, items2, [object4]);
|
||||
push = items2.push;
|
||||
const object6 = {};
|
||||
object6.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m']);
|
||||
object6.data = existingMembersRows;
|
||||
Reflect.apply(push, items2, [object6]);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const object7 = {'scrollable': true, 'header': null, 'startExpanded': true};
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
string = intl.string;
|
||||
const ES4CC6 = (require(1244) /* metro dependency 1244: indexNative */).t.ES4CC6;
|
||||
if (value6) {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
r7 = <PressableOpacity onPress={onPress_87317} accessibilityRole="button" accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XPDhcc)}>{((SettingsIcon) => <SettingsIcon />)((require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon)}</PressableOpacity>;
|
||||
} else {
|
||||
r7 = value6;
|
||||
}
|
||||
object7.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl,
|
||||
[ES4CC6])} subtitle={'#' + value5} trailing={r7} />;
|
||||
if (value6) {
|
||||
const RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton;
|
||||
r9 = <RowButton label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)} onPress={onPress_87318} icon={((GroupPlusIcon) => <GroupPlusIcon />)((require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon)} />;
|
||||
} else {
|
||||
r9 = <View style={styles.warning}>{((HelpMessage) => <HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.INFO}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VOuiSj)}</HelpMessage>)((require(1305) /* metro dependency 1305: native */).HelpMessage)}</View>;
|
||||
}
|
||||
const BottomSheetSectionList = (require(6277) /* metro dependency 6277 */).BottomSheetSectionList;
|
||||
const bottom = value2.bottom;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
return (
|
||||
<BottomSheet {...object7}>
|
||||
<View style={styles.container}>
|
||||
{r9}
|
||||
<BottomSheetSectionList
|
||||
contentContainerStyle={{paddingBottom: bottom + PX_16}}
|
||||
renderItem={renderItem_87319}
|
||||
renderSectionHeader={renderSectionHeader_87320}
|
||||
sections={items2}
|
||||
stickySectionHeadersEnabled={false}
|
||||
/>
|
||||
</View>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87315() { // fn#87315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:714, offset: 0x01fb85af, size: 92 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const getGuild = GuildStore.getGuild;
|
||||
const channelBinding = channel;
|
||||
const value3 = undefined;
|
||||
const value5 = Reflect.apply(getGuild, GuildStore, [channelBinding == null ? value3 : channel.getGuildId()]);
|
||||
return {guild: value5, sortedGuildRoles: value5 != null ? GuildRoleStore.getSortedRoles(value5.id) : value3};
|
||||
}
|
||||
|
||||
function _fun87316() { // fn#87316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:916, offset: 0x01fb860b, size: 52 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return GuildMemberStore.getMemberIds(channel?.getGuildId());
|
||||
}
|
||||
|
||||
function ChannelMembersActionSheetOnPress() { // fn#87317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:1540, owner: ChannelMembersActionSheet.onPress, offset: 0x01fb863f, size: 119 bytes, params: 1, frame: 18
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
const defaultImport2 = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
|
||||
const init = defaultImport2.init;
|
||||
const channelIdBinding = channelId;
|
||||
Reflect.apply(init, defaultImport2, [channelIdBinding]);
|
||||
const channelDetailsUtilsModule = require(11394) /* metro dependency 11394: ChannelDetailsUtils */;
|
||||
const navigateToChannelDetailsScreen = channelDetailsUtilsModule.navigateToChannelDetailsScreen;
|
||||
const binding = env0_4;
|
||||
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
|
||||
Reflect.apply(navigateToChannelDetailsScreen, channelDetailsUtilsModule, [binding, PERMISSIONS, channelIdBinding,
|
||||
'channel-members-action-sheet']);
|
||||
}
|
||||
|
||||
function ChannelMembersActionSheetOnPress_87318() { // fn#87318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:1950, owner: ChannelMembersActionSheet.onPress, offset: 0x01fb86b6, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
|
||||
return value.openAddMembersActionSheet(channel);
|
||||
}
|
||||
|
||||
function ChannelMembersActionSheetRenderItem({item, index, section}) { // fn#87319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:2292, owner: ChannelMembersActionSheet.renderItem, offset: 0x01fb86e3, size: 132 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component start={index === 0} end={index === section.data.length - 1} guildId={guildId} item={item} channelId={channelId} showType showRemove={env0_5} />)(importDefault(9096) /* metro dependency 9096: ChannelOverwritesItem */);
|
||||
}
|
||||
|
||||
function ChannelMembersActionSheetRenderSectionHeader(a0) { // fn#87320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11579:2461, owner: ChannelMembersActionSheet.renderSectionHeader, offset: 0x01fb8767, size: 165 bytes, params: 2, frame: 20
|
||||
const {title, data} = a0.section;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<Text
|
||||
style={styles.sectionRowWrapper}
|
||||
maxFontSizeMultiplier={2}
|
||||
accessibilityRole="header"
|
||||
variant="text-sm/semibold"
|
||||
color="interactive-text-default"
|
||||
>
|
||||
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.u8CWLl, {numberOfItems: data.length,
|
||||
sectionTitle: title})}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* Metro module 11929; source: modules/channel_permissions/native/components/ChannelAccessInfo.tsx; dependencies: [31, 27, 1422, 1945, 1938, 33, 4501, 697, 1244, 566, 9088, 1360, 4573, 5278, 11392, 1305, 11928, 6699, 9099, 9097, 10787, 2] */
|
||||
function _fun91525(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:6, offset: 0x02068d4b, size: 459 bytes, params: 8, frame: 25
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_5 = (require(1422) /* metro dependency 1422: GuildRecord */).isGuildOwner;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = value.Fragment;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object4 = {'alignItems': 'center', 'backgroundColor': null, 'borderRadius': null, 'color': null,
|
||||
'flexDirection': 'row', 'marginBottom': 8, 'marginTop': 8, 'padding': 16};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object4.color = TEXT_DEFAULT;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{section: object4, sectionContent: {'alignItems': 'center',
|
||||
'flexDirection': 'row', 'flexGrow': 1}, avatar: {marginRight: 8}, labelDetail: {marginRight: 12},
|
||||
sectionIcon: {marginRight: 6}}]);
|
||||
object3 = {MEMBERS: 0};
|
||||
object3[0] = 'MEMBERS';
|
||||
object3.ROLES = 1;
|
||||
object3[1] = 'ROLES';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelAccessInfo.tsx');
|
||||
exports.default = ChannelAccessInfo;
|
||||
}
|
||||
|
||||
function ChannelAccessInfo({guild, channel}) { // fn#91526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:780, offset: 0x02068f16, size: 984 bytes, params: 2, frame: 37
|
||||
var object;
|
||||
var binding;
|
||||
var MEMBERS;
|
||||
var items3;
|
||||
var ROLES;
|
||||
var items4;
|
||||
var items5;
|
||||
const closure = renderCounts;
|
||||
const styles = useStyles();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value3 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.li1wKf);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildRoleStore], _fun91528,
|
||||
[guild, channel]);
|
||||
const existingMembers = (require(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembers(GuildMemberStore.getMemberIds(guild?.id),
|
||||
channel, guild, channel.accessPermissions);
|
||||
let length = value4.length;
|
||||
const r22 = length === 0 && existingMembers.length === 1 && isGuildOwner(guild,
|
||||
existingMembers[0]) ? existingMembers[0] : null;
|
||||
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="eyebrow">{value3}</Text>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {accessibilityLabel: value3, accessibilityRole: 'button', onPress: onPress_91529,
|
||||
style: styles.section};
|
||||
if (r22 != null) {
|
||||
items4 = [((Avatar) => <Avatar style={styles.avatar} user={r22} guildId={guild.id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items5 = [<Text variant="text-sm/semibold">{r22.tag}</Text>];
|
||||
items5[1] = <Text variant="text-xs/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt0ERW)}</Text>;
|
||||
items4[1] = <View>{items5}</View>;
|
||||
object = {children: items4};
|
||||
} else {
|
||||
binding = env0_12;
|
||||
MEMBERS = binding.MEMBERS;
|
||||
length = existingMembers.length;
|
||||
importDefault(11928) /* metro dependency 11928 */;
|
||||
items3 = [closure(MEMBERS, length, undefined,
|
||||
(require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon)];
|
||||
ROLES = binding.ROLES;
|
||||
length = value4.length;
|
||||
importDefault(9099) /* metro dependency 9099 */;
|
||||
items3[1] = closure(ROLES, length, undefined,
|
||||
(require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon);
|
||||
object = {children: items3};
|
||||
}
|
||||
const view = <View style={styles.sectionContent}>{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_10Binding)}</View>;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(10787) /* metro dependency 10787 */};
|
||||
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const Sizes = Icon2.Sizes;
|
||||
const SMALL = Sizes.SMALL;
|
||||
iconProps.size = SMALL;
|
||||
return (
|
||||
<>
|
||||
{text}
|
||||
<PressableOpacity {...pressableOpacityProps}>
|
||||
{view}
|
||||
<Icon {...iconProps} />
|
||||
</PressableOpacity>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function renderCounts(a0, a1, a2, a3) { // fn#91527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1105, owner: ChannelAccessInfo.renderCounts, offset: 0x020692ee, size: 529 bytes, params: 5, frame: 20
|
||||
var r8;
|
||||
var value2;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
if (a1 === 0) {
|
||||
return null;
|
||||
}
|
||||
const MEMBERS = env1_12.MEMBERS;
|
||||
if (MEMBERS === a0) {
|
||||
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.PR5l07,
|
||||
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.bu5sya,
|
||||
{count: a1});
|
||||
} else if (env1_12.ROLES === a0) {
|
||||
r8 = a1 > 100 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+OYnFQ'],
|
||||
{count: 100}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.T2BEtm,
|
||||
{count: a1});
|
||||
} else {
|
||||
value2 = undefined;
|
||||
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(a0);
|
||||
r8 = value2;
|
||||
}
|
||||
const Fragment = env1_3.Fragment;
|
||||
const value8 = ((Component) => <Component size="sm" style={styles.sectionIcon} />)(a3);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Fragment>
|
||||
{value8}
|
||||
<Text style={styles.labelDetail} variant="text-sm/medium">
|
||||
{r8}
|
||||
</Text>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun91528() { // fn#91528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:917, offset: 0x020694ff, size: 83 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const channelPermissionsUtilsModule = require(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
const getExistingRoles = channelPermissionsUtilsModule.getExistingRoles;
|
||||
const guildBinding = guild;
|
||||
value = GuildRoleStore.getSortedRoles(guildBinding.id);
|
||||
const channelBinding = channel;
|
||||
return Reflect.apply(getExistingRoles, channelPermissionsUtilsModule, [guildBinding, value, channelBinding,
|
||||
channelBinding.accessPermissions]);
|
||||
}
|
||||
|
||||
function ChannelAccessInfoOnPress() { // fn#91529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12115:1853, owner: ChannelAccessInfo.onPress, offset: 0x02069552, size: 56 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__;
|
||||
value = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
|
||||
const openChannelMembersActionSheet = value.openChannelMembersActionSheet;
|
||||
const channelBinding = channel;
|
||||
Reflect.apply(openChannelMembersActionSheet, value, [channelBinding.id, channelBinding.guild_id]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
/* Metro module 9096; source: modules/channel_permissions/native/components/ChannelOverwritesItem.tsx; dependencies: [31, 27, 1878, 8120, 33, 4501, 4500, 1244, 4603, 3856, 5278, 6988, 6238, 9097, 9088, 4573, 1305, 9098, 9099, 3874, 7974, 2] */
|
||||
function _fun71166(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:6, offset: 0x01d17473, size: 393 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const closure = ChannelOverwritesItem;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_6 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).RowType;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({nameWrapper: {'flexDirection': 'row',
|
||||
'alignItems': 'flex-end', 'marginRight': 16}, name: {paddingRight: 4}, memberName: {flexShrink: 1},
|
||||
ownerIcon: {alignSelf: 'center'}, roleIcon: {'height': 30, 'width': 30}, rowRemoveIconDisabled: {opacity: 0.3}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/ChannelOverwritesItem.tsx');
|
||||
exports.default = closure;
|
||||
exports.ChannelOverwritesCheckboxItem = ChannelOverwritesCheckboxItem;
|
||||
}
|
||||
|
||||
function RemoveIcon({item, channelId, onRemove}) { // fn#71167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:415, offset: 0x01d175fc, size: 231 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var PressableOpacity;
|
||||
var object2;
|
||||
var disabled;
|
||||
var intl;
|
||||
var CircleXIcon;
|
||||
const styles = useStyles();
|
||||
if (channelId == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
object2 = {};
|
||||
disabled = item.disabled;
|
||||
object2.disabled = disabled;
|
||||
object2.accessibilityRole = 'button';
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
|
||||
object2.onPress = function() {
|
||||
var itemBinding;
|
||||
if (onRemove != null) {
|
||||
return onRemove(item);
|
||||
}
|
||||
itemBinding = item;
|
||||
_fun71169(itemBinding.id, itemBinding.name, channelId);
|
||||
};
|
||||
CircleXIcon = (require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon;
|
||||
disabled = item.disabled;
|
||||
r0 = <PressableOpacity {...object2}><CircleXIcon style={disabled ? styles.rowRemoveIconDisabled : undefined} /></PressableOpacity>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function RoleItem_71172({disabled, item, subLabel, channelId, showType, showRemove, start, end, trailing, onPress, accessibilityRole, accessibilityState, accessible}) { // fn#71172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1122, offset: 0x01d1789b, size: 285 bytes, params: 2, frame: 31
|
||||
var r16;
|
||||
var moduleValue;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {};
|
||||
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
|
||||
object2.icon = <ShieldUserIcon size="lg" color={item.colorString} />;
|
||||
object2.label = item.name;
|
||||
if (showType) {
|
||||
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
r16 = moduleValue.getRowTypeLabel(item.rowType);
|
||||
} else {
|
||||
r16 = subLabel;
|
||||
}
|
||||
object2.subLabel = r16;
|
||||
object2.start = start;
|
||||
object2.end = end;
|
||||
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} /> : trailing;
|
||||
object2.onPress = onPress;
|
||||
object2.disabled = disabled;
|
||||
object2.accessibilityRole = accessibilityRole;
|
||||
object2.accessibilityState = accessibilityState;
|
||||
object2.accessible = accessible;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function MemberItem({item, channelId, showRemove, onRemove, guildId, start, end, trailing, onPress, disabled, accessibilityRole, accessibilityState, accessible}) { // fn#71173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:1590, offset: 0x01d179b8, size: 574 bytes, params: 2, frame: 37
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text style={[styles.name,
|
||||
styles.memberName]} lineClamp={1} variant="text-md/semibold" color="interactive-text-active">{item.name}</Text>;
|
||||
const rowType = item.rowType;
|
||||
const OWNER = RowType.OWNER;
|
||||
const view = <View style={styles.nameWrapper}>{text}{rowType !== OWNER ? null : ((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16} source={importDefault(9098) /* metro dependency 9098 */} disableColor style={styles.ownerIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
object2 = {};
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const avatarSource = UserStore.getUser(item.id)?.getAvatarSource(guildId);
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SMALL = AvatarSizes.SMALL;
|
||||
object2.icon = <Avatar source={avatarSource} size={SMALL} />;
|
||||
object2.label = view;
|
||||
const username = item.username;
|
||||
object2.subLabel = username;
|
||||
object2.start = start;
|
||||
object2.end = end;
|
||||
object2.trailing = showRemove ? <RemoveIcon item={item} channelId={channelId} onRemove={onRemove} /> : trailing;
|
||||
object2.onPress = onPress;
|
||||
object2.disabled = disabled;
|
||||
object2.accessibilityRole = accessibilityRole;
|
||||
object2.accessibilityState = accessibilityState;
|
||||
object2.accessible = accessible;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function EmptyRoleItem({item}) { // fn#71174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2413, offset: 0x01d17bf6, size: 168 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
||||
const iconProps = {source: importDefault(9099) /* metro dependency 9099 */, color: item.colorString};
|
||||
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
|
||||
const MEDIUM = IconSizes.MEDIUM;
|
||||
iconProps.size = MEDIUM;
|
||||
iconProps.style = styles.roleIcon;
|
||||
return <TableRow icon={<Icon {...iconProps} />} label={item.name} />;
|
||||
}
|
||||
|
||||
function ChannelOverwritesItem(a0) { // fn#71175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:2607, offset: 0x01d17c9e, size: 217 bytes, params: 2, frame: 17
|
||||
const item = a0.item;
|
||||
const value = Object.create(null);
|
||||
value.item = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const rowType = item.rowType;
|
||||
const ADMINISTRATOR = RowType.ADMINISTRATOR;
|
||||
if (ADMINISTRATOR === rowType) {
|
||||
return <RoleItem_71172 item={item} {...value2} />;
|
||||
}
|
||||
const ROLE = RowType.ROLE;
|
||||
if (ROLE === rowType) {
|
||||
return <RoleItem_71172 item={item} {...value2} />;
|
||||
}
|
||||
const OWNER = RowType.OWNER;
|
||||
if (OWNER === rowType) {
|
||||
return <MemberItem item={item} {...value2} />;
|
||||
}
|
||||
const MEMBER = RowType.MEMBER;
|
||||
if (MEMBER === rowType) {
|
||||
return <MemberItem item={item} {...value2} />;
|
||||
}
|
||||
const EMPTY_STATE = RowType.EMPTY_STATE;
|
||||
if (EMPTY_STATE === rowType) {
|
||||
return <EmptyRoleItem item={item} {...value2} />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function ChannelOverwritesCheckboxItem(a0) { // fn#71176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:3055, offset: 0x01d17d77, size: 185 bytes, params: 2, frame: 22
|
||||
const checked = a0.checked;
|
||||
const value = Object.create(null);
|
||||
value.checked = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: checked});
|
||||
const channelOverwritesItemBindingProps = {...value2};
|
||||
channelOverwritesItemBindingProps['accessible'] = true;
|
||||
channelOverwritesItemBindingProps['accessibilityRole'] = accessibilityRole;
|
||||
channelOverwritesItemBindingProps['accessibilityState'] = accessibilityState;
|
||||
const FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
|
||||
channelOverwritesItemBindingProps['trailing'] = <FormCheckbox checked={checked} />;
|
||||
return <ChannelOverwritesItem {...channelOverwritesItemBindingProps} />;
|
||||
}
|
||||
|
||||
function RemoveIconOnPress() { // fn#71168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:639, owner: RemoveIcon.onPress, offset: 0x01d176e3, size: 68 bytes, params: 1, frame: 16
|
||||
if (onRemove != null) {
|
||||
return onRemove(item);
|
||||
}
|
||||
const itemBinding = item;
|
||||
removeMemberOrRole(itemBinding.id, itemBinding.name, channelId);
|
||||
}
|
||||
|
||||
function removeMemberOrRole(a0, a1, a2) { // fn#71169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:668, owner: RemoveIcon.onPress.removeMemberOrRole, offset: 0x01d17727, size: 258 bytes, params: 4, frame: 22
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(4500) /* metro dependency 4500: AlertModalNative */;
|
||||
const showConfirmModal = value.showConfirmModal;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const GuPYQB = t.GuPYQB;
|
||||
Reflect.apply(showConfirmModal, value, [{key: 'remove-channel-overwrite-' + a0, title: Reflect.apply(string, intl,
|
||||
[GuPYQB]), content: intl.format(t.xERCnZ, {name: a1}), confirmText: intl.string(t.fKxYb0),
|
||||
onConfirm: onConfirm_71170}]);
|
||||
}
|
||||
|
||||
function removeMemberOrRoleOnConfirm() { // fn#71170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:924, owner: RemoveIcon.onPress.removeMemberOrRole.onConfirm, offset: 0x01d17829, size: 69 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value = value.clearPermissionOverwrite(importDefault, env0_0);
|
||||
value.then(_fun71171);
|
||||
}
|
||||
|
||||
function _fun71171() { // fn#71171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9281:973, offset: 0x01d1786e, size: 45 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).memberOrRoleRemovedToast(require);
|
||||
}
|
||||
|
||||
+479
@@ -0,0 +1,479 @@
|
||||
/* Metro module 15185; source: modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx; dependencies: [57, 5, 31, 27, 15186, 1379, 1945, 1938, 1867, 3784, 3793, 1878, 8120, 661, 33, 4501, 697, 1484, 566, 9088, 9089, 9090, 1244, 4805, 4647, 9096, 3789, 4572, 6231, 6808, 1305, 6238, 10504, 11392, 5286, 4863, 8853, 9221, 15187, 15189, 2] */
|
||||
function _fun116013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:6, offset: 0x02477fc1, size: 622 bytes, params: 8, frame: 22
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_6 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_7 = value.View;
|
||||
const env0_8 = value.ScrollView;
|
||||
const channelSettingsPermissionsStore = importDefault(15186) /* metro dependency 15186: ChannelSettingsPermissionsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_17 = (require(8120) /* metro dependency 8120: ChannelPermissionsConstants */).SettingMode;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_18 = value.ChannelTypes;
|
||||
const env0_19 = value.Permissions;
|
||||
const env0_20 = value.AnalyticEvents;
|
||||
const env0_21 = value.ChannelSettingsSections;
|
||||
const env0_22 = value.SettingsPaneTypes;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_23 = value.jsx;
|
||||
const env0_24 = value.jsxs;
|
||||
object2 = {BASIC: 0};
|
||||
object2[0] = 'BASIC';
|
||||
object2.ADVANCED = 1;
|
||||
object2[1] = 'ADVANCED';
|
||||
object2.MODERATORS = 2;
|
||||
object2[2] = 'MODERATORS';
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object2.container = {'flex': 1, 'paddingTop': 16, backgroundColor: BACKGROUND_BASE_LOWER};
|
||||
object2.content = {'marginTop': 16, 'flex': 1};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.adminWarning = {marginTop: PX_12};
|
||||
const env0_26 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel_permissions/native/components/EasyChannelPermissionSettings.tsx');
|
||||
exports.default = EasyChannelPermissionSettings;
|
||||
}
|
||||
|
||||
function ChannelPermissionSettingsBasicView({channel, privateToggleState, setPrivateToggleState}) { // fn#116014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:706, offset: 0x0247822f, size: 1584 bytes, params: 2, frame: 39
|
||||
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
|
||||
let env0_6 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const {guild,
|
||||
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildStore,
|
||||
GuildRoleStore], _fun116016);
|
||||
env0_6.useLayoutEffect(_fun116017, [value3]);
|
||||
const value5 = env0_6.useMemo(_fun116018, [guild, sortedGuildRoles, channel]);
|
||||
if (guild == null) {
|
||||
return null;
|
||||
}
|
||||
if (sortedGuildRoles == null) {
|
||||
return null;
|
||||
}
|
||||
const isCategory2 = channel.isCategory();
|
||||
const existingMembersRows = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).getExistingMembersRows(GuildMemberStore.getMemberIds(guild?.id),
|
||||
channel, guild, channel.accessPermissions);
|
||||
env0_6 = _fun116019();
|
||||
const value8 = _fun116023();
|
||||
const isPrivateGuildChannel2 = (importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */).isPrivateGuildChannel(channel);
|
||||
const permissionUtilsModule = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
let canEveryoneRole = permissionUtilsModule.canEveryoneRole;
|
||||
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
||||
const canEveryoneRole2 = Reflect.apply(canEveryoneRole, permissionUtilsModule, [VIEW_CHANNEL, guild]);
|
||||
const moduleValue6 = permissionUtilsModule;
|
||||
canEveryoneRole = moduleValue6.canEveryoneRole;
|
||||
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
|
||||
const canEveryoneRole3 = Reflect.apply(canEveryoneRole, moduleValue6, [ADMINISTRATOR, guild]);
|
||||
const type = channel.type;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const value9 = Reflect.apply(string, intl, [t.hfbjIH]);
|
||||
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
|
||||
const r17 = type === GUILD_CATEGORY ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.RQUk61) : type !== ChannelTypes.GUILD_VOICE ? value9 : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cLjvKg);
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const object = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
string = intl.string;
|
||||
const items2 = [<TableRowGroup title={r17} hasIcons={false}><TableSwitchRow label={isCategory2 ? Reflect.apply(string,
|
||||
intl, [t.lEPAZ5]) : Reflect.apply(string, intl,
|
||||
[t.aUI70g])} value={privateToggleState} onValueChange={value8} /></TableRowGroup>];
|
||||
items2[1] = canEveryoneRole3 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5f3HIC'])}</HelpMessage></View>;
|
||||
items2[2] = !canEveryoneRole3 && !canEveryoneRole2 && !isPrivateGuildChannel2 && <View style={styles.adminWarning}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.WARNING}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZAk4Q9)}</HelpMessage></View>;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const CirclePlusIcon = (require(10504) /* metro dependency 10504: CirclePlusIcon */).CirclePlusIcon;
|
||||
items2[3] = <TableRowGroup hasIcons><TableRow arrow icon={<CirclePlusIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dMJ3Y6)} onPress={onPress_116028} /></TableRowGroup>;
|
||||
string = intl.string;
|
||||
const ES4CC6 = (require(1244) /* metro dependency 1244: indexNative */).t.ES4CC6;
|
||||
items2[4] = <TableRowGroup title={Reflect.apply(string, intl, [ES4CC6])} hasIcons>{value5.map(function(a0) {
|
||||
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
|
||||
})}</TableRowGroup>;
|
||||
items2[5] = <TableRowGroup hasIcons>{existingMembersRows.map(function(a0) {
|
||||
return ChannelPermissionSettingsBasicViewRenderRowItem(a0);
|
||||
})}</TableRowGroup>;
|
||||
return (
|
||||
<Stack style={object} spacing={PX_16}>
|
||||
{items2}
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
function onBack() { // fn#116031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3892, offset: 0x02478d56, size: 39 bytes, params: 1, frame: 11
|
||||
(importDefault(4647) /* metro dependency 4647: AlertActionCreators */).close();
|
||||
return false;
|
||||
}
|
||||
|
||||
function EasyChannelPermissionSettings({channelId, origin}) { // fn#116032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4061, offset: 0x02478d7d, size: 1018 bytes, params: 2, frame: 28
|
||||
var r0;
|
||||
var object3;
|
||||
let env0_4 = undefined;
|
||||
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(onBack);
|
||||
const styles = useStyles();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const advancedMode = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsPermissionsStore],
|
||||
function() {
|
||||
return ChannelSettingsPermissionsStore.advancedMode;
|
||||
});
|
||||
let binding = env0_6;
|
||||
let useState = binding.useState;
|
||||
const value4 = Reflect.apply(useState, binding,
|
||||
[channel == null ? advancedMode ? env0_25.ADVANCED : env0_25.BASIC : channel.isGuildStageVoice() ? env0_25.MODERATORS : advancedMode ? env0_25.ADVANCED : env0_25.BASIC]);
|
||||
binding = env0_4;
|
||||
const value5 = binding(value4, 2);
|
||||
let property = value5[0];
|
||||
env0_4 = value5[1];
|
||||
const binding3 = env0_6;
|
||||
useState = binding3.useState;
|
||||
const channelPermissionsUtilsModule = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
const value6 = binding(Reflect.apply(useState, binding3,
|
||||
[channelPermissionsUtilsModule.isPrivateGuildChannel(channel)]), 2);
|
||||
const property2 = value6[0];
|
||||
const property3 = value6[1];
|
||||
env0_6.useEffect(function() {
|
||||
var originBinding = origin;
|
||||
var property = ChannelSettingsSections.OVERVIEW;
|
||||
var defaultImport = importDefault(dependencyMap[35]);
|
||||
var trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
var SETTINGS_PANE_VIEWED = AnalyticEvents.SETTINGS_PANE_VIEWED;
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [SETTINGS_PANE_VIEWED, {settings_type: 'channel',
|
||||
origin_pane: originBinding !== property ? null : SettingsPaneTypes.CHANNEL_SETTINGS,
|
||||
destination_pane: ChannelSettingsSections.PERMISSIONS}]);
|
||||
}, [origin]);
|
||||
const value7 = env0_6.useCallback(_fun116036, [channel]);
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
items = [intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Mw/UDN'])];
|
||||
items[1] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0a6awf']);
|
||||
if (channel?.isGuildStageVoice() === true) {
|
||||
items.push(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.YIIUJ3));
|
||||
}
|
||||
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
||||
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
||||
const object5 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: value7};
|
||||
object5.items = items.map(function(a0) {
|
||||
return {id: a0, label: a0, page: null};
|
||||
});
|
||||
const value9 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object5]);
|
||||
env0_6.useEffect(_fun116038, [channel, property]);
|
||||
if (channel != null) {
|
||||
var viewBindingProps = {style: styles.container};
|
||||
object3 = {};
|
||||
object3.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
r0 = <View {...viewBindingProps}><View style={object3}>{((SegmentedControl) => <SegmentedControl state={value9} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View><ScrollView style={styles.content}>{property === env0_25.BASIC ? <ChannelPermissionSettingsBasicView channel={channel} privateToggleState={property2} setPrivateToggleState={property3} /> : property === env0_25.MODERATORS ? ((Component) => <Component channel={channel} />)(importDefault(15187) /* metro dependency 15187: ViewModerators */) : ((Component) => <Component channelId={channel.id} />)(importDefault(15189) /* metro dependency 15189: ChannelSettingsPermissionsOverview */)}</ScrollView></View>;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChannelPermissionSettingsBasicViewRenderRowItem(a0) { // fn#116015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2394, owner: ChannelPermissionSettingsBasicView.renderRowItem, offset: 0x0247885f, size: 89 bytes, params: 2, frame: 18
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(9096) /* metro dependency 9096: ChannelOverwritesItem */;
|
||||
const channelBinding = channel;
|
||||
return ((Component) => <Component item={a0} channelId={channelBinding.id} showType showRemove guildId={channelBinding.guild_id} key={a0.id} />)(value);
|
||||
}
|
||||
|
||||
function _fun116016() { // fn#116016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:888, offset: 0x024788b8, size: 79 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
const getGuild = GuildStore.getGuild;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channelBinding, [])]);
|
||||
return {guild: value3, sortedGuildRoles: value3 != null ? GuildRoleStore.getSortedRoles(value3.id) : undefined};
|
||||
}
|
||||
|
||||
function _fun116017() { // fn#116017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1050, offset: 0x02478907, size: 29 bytes, params: 1, frame: 13
|
||||
env0_3.setOptions({headerRight: undefined});
|
||||
}
|
||||
|
||||
function _fun116018() { // fn#116018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1114, offset: 0x02478924, size: 88 bytes, params: 1, frame: 17
|
||||
var r0;
|
||||
var sortedGuildRolesBinding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var getExistingRolesRows;
|
||||
var channelBinding;
|
||||
let guildBinding = guild;
|
||||
if (guildBinding == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
sortedGuildRolesBinding = sortedGuildRoles;
|
||||
if (sortedGuildRolesBinding == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
getExistingRolesRows = moduleValue.getExistingRolesRows;
|
||||
guildBinding = guild;
|
||||
sortedGuildRolesBinding = sortedGuildRoles;
|
||||
channelBinding = channel;
|
||||
r0 = Reflect.apply(getExistingRolesRows, moduleValue, [guildBinding, sortedGuildRolesBinding,
|
||||
channelBinding,
|
||||
channelBinding.accessPermissions]);
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116019() { // fn#116019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1359, offset: 0x0247897c, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_5(_fun116021);
|
||||
return _fun116022;
|
||||
}
|
||||
|
||||
function _fun116023() { // fn#116023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1707, offset: 0x02478aaf, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_5(_fun116025);
|
||||
return _fun116027;
|
||||
}
|
||||
|
||||
function ChannelPermissionSettingsBasicViewOnPress() { // fn#116028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:3630, owner: ChannelPermissionSettingsBasicView.onPress, offset: 0x02478d1d, size: 57 bytes, params: 1, frame: 12
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (channel != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(11392) /* metro dependency 11392: ChannelPermissionsUtils */;
|
||||
moduleValue.openAddMembersActionSheet(channel);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun116036(a0) { // fn#116036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:4679, offset: 0x024791f7, size: 151 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var moduleValue;
|
||||
const value = environment.__proto__;
|
||||
const ADVANCED = env1_25.ADVANCED;
|
||||
if (a0 === ADVANCED) {
|
||||
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(true);
|
||||
} else {
|
||||
binding = env0_5;
|
||||
moduleValue = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
binding(moduleValue.isPrivateGuildChannel(channel));
|
||||
(require(9089) /* metro dependency 9089: ChannelSettingsPermissionsActionCreators */).setAdvancedMode(false);
|
||||
}
|
||||
env0_4(a0);
|
||||
}
|
||||
|
||||
function _fun116038() { // fn#116038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:5144, offset: 0x0247928e, size: 140 bytes, params: 1, frame: 18
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const trackWithMetadata = defaultImport.trackWithMetadata;
|
||||
const CHANNEL_PERMISSIONS_PAGE_VIEWED = AnalyticEvents.CHANNEL_PERMISSIONS_PAGE_VIEWED;
|
||||
const object2 = {};
|
||||
const binding = env0_3;
|
||||
const BASIC = env1_25.BASIC;
|
||||
object2.mode = binding === BASIC ? SettingMode.BASIC : SettingMode.ADVANCED;
|
||||
value = importAll(9088) /* metro dependency 9088: ChannelPermissionsUtils */;
|
||||
object2.channel_is_private = value.isPrivateGuildChannel(channel);
|
||||
Reflect.apply(trackWithMetadata, defaultImport, [CHANNEL_PERMISSIONS_PAGE_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function* _fun116021() { // fn#116021, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1379, offset: 0x024789ab, size: 260 bytes, params: 1, frame: 22
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var binding = env3_2;
|
||||
var binding2 = env3_3;
|
||||
var isPrivateGuildChannel2 = binding(binding2[19]).isPrivateGuildChannel(require);
|
||||
var accessPermissions = require.accessPermissions;
|
||||
var value6 = binding(binding2[19]).flipEveryonePermission(require, accessPermissions, isPrivateGuildChannel2);
|
||||
var currentUser = env3_16.getCurrentUser();
|
||||
binding = env3_14;
|
||||
var can = binding.can;
|
||||
var ADMINISTRATOR = env3_19.ADMINISTRATOR;
|
||||
var value8 = Reflect.apply(can, binding, [ADMINISTRATOR, env2_4]);
|
||||
var r4 = View || currentUser == null;
|
||||
r4 = !r4 ? value8 : r4;
|
||||
if (!r4) {
|
||||
var value10 = env3_2(env3_3[19]);
|
||||
yield value10.grantUserChannelAccess(require, accessPermissions);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
value = env3_0(env3_3[20]);
|
||||
yield value.savePermissionUpdates(require.id, [value6]);
|
||||
}
|
||||
}
|
||||
|
||||
function* _fun116025() { // fn#116025, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:1727, offset: 0x02478ade, size: 521 bytes, params: 1, frame: 23
|
||||
var environment;
|
||||
var r9;
|
||||
var r8;
|
||||
var binding;
|
||||
var value7;
|
||||
var binding2;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var value10;
|
||||
var computeChannelName;
|
||||
var channelName;
|
||||
var binding3;
|
||||
var format;
|
||||
var object2;
|
||||
var binding4;
|
||||
var value13;
|
||||
var show;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (require.guild_id == null) {
|
||||
value7 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_0;
|
||||
binding2 = env3_3;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl, [t['47gQYL']]);
|
||||
binding = env3_0;
|
||||
value10 = binding(env3_3[23]);
|
||||
computeChannelName = value10.computeChannelName;
|
||||
binding = env3_16;
|
||||
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
|
||||
binding = env3_0;
|
||||
binding3 = env3_3;
|
||||
intl = binding(binding3[22]).intl;
|
||||
format = intl.format;
|
||||
t = binding(binding3[22]).t;
|
||||
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
|
||||
{channelName: channelName}]) : Reflect.apply(format,
|
||||
intl, [t.rKzX1E, {channelName: channelName}]);
|
||||
importAll(!importDefault);
|
||||
binding = env3_1;
|
||||
binding4 = env3_3;
|
||||
value13 = binding(binding4[24]);
|
||||
show = value13.show;
|
||||
object2 = {title: r9, body: r8};
|
||||
binding = env3_0;
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
|
||||
object2.onConfirm = env2_6;
|
||||
object2.hideActionSheet = false;
|
||||
object2.onCancel = onCancel_116026;
|
||||
Reflect.apply(show, value13, [object2]);
|
||||
} else {
|
||||
if (importDefault) {
|
||||
value7 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_0;
|
||||
binding2 = env3_3;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
|
||||
[t['47gQYL']]);
|
||||
binding = env3_0;
|
||||
value10 = binding(env3_3[23]);
|
||||
computeChannelName = value10.computeChannelName;
|
||||
binding = env3_16;
|
||||
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
|
||||
binding = env3_0;
|
||||
binding3 = env3_3;
|
||||
intl = binding(binding3[22]).intl;
|
||||
format = intl.format;
|
||||
t = binding(binding3[22]).t;
|
||||
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
|
||||
{channelName: channelName}]) : Reflect.apply(format,
|
||||
intl, [t.rKzX1E, {channelName: channelName}]);
|
||||
importAll(!importDefault);
|
||||
binding = env3_1;
|
||||
binding4 = env3_3;
|
||||
value13 = binding(binding4[24]);
|
||||
show = value13.show;
|
||||
object2 = {title: r9, body: r8};
|
||||
binding = env3_0;
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
|
||||
object2.onConfirm = env2_6;
|
||||
object2.hideActionSheet = false;
|
||||
object2.onCancel = onCancel_116026;
|
||||
Reflect.apply(show, value13, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
binding = env3_0;
|
||||
var value4 = binding(env3_3[21]);
|
||||
var checkChattableChannelThresholdMetAfterChannelPermissionDeny = value4.checkChattableChannelThresholdMetAfterChannelPermissionDeny;
|
||||
var VIEW_CHANNEL = env3_19.VIEW_CHANNEL;
|
||||
yield Reflect.apply(checkChattableChannelThresholdMetAfterChannelPermissionDeny, value4, [require,
|
||||
VIEW_CHANNEL]);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
if (value5) {
|
||||
value7 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_0;
|
||||
binding2 = env3_3;
|
||||
intl = binding(binding2[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[22]).t;
|
||||
r9 = importDefault ? Reflect.apply(string, intl, [t.vw48TT]) : Reflect.apply(string, intl,
|
||||
[t['47gQYL']]);
|
||||
binding = env3_0;
|
||||
value10 = binding(env3_3[23]);
|
||||
computeChannelName = value10.computeChannelName;
|
||||
binding = env3_16;
|
||||
channelName = Reflect.apply(computeChannelName, value10, [require, binding, env3_15]);
|
||||
binding = env3_0;
|
||||
binding3 = env3_3;
|
||||
intl = binding(binding3[22]).intl;
|
||||
format = intl.format;
|
||||
t = binding(binding3[22]).t;
|
||||
r8 = importDefault ? Reflect.apply(format, intl, [t.hGzPnx,
|
||||
{channelName: channelName}]) : Reflect.apply(format,
|
||||
intl, [t.rKzX1E, {channelName: channelName}]);
|
||||
importAll(!importDefault);
|
||||
binding = env3_1;
|
||||
binding4 = env3_3;
|
||||
value13 = binding(binding4[24]);
|
||||
show = value13.show;
|
||||
object2 = {title: r9, body: r8};
|
||||
binding = env3_0;
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.cancelText = Reflect.apply(string, intl, [t['ETE/oC']]);
|
||||
intl = binding(binding4[22]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding4[22]).t;
|
||||
object2.confirmText = Reflect.apply(string, intl, [t.p89ACt]);
|
||||
object2.onConfirm = env2_6;
|
||||
object2.hideActionSheet = false;
|
||||
object2.onCancel = onCancel_116026;
|
||||
Reflect.apply(show, value13, [object2]);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onCancel_116026() { // fn#116026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15382:2293, offset: 0x02478ce7, size: 54 bytes, params: 1, frame: 13
|
||||
const value3 = env4_2(env4_3[19]);
|
||||
importAll(value3.isPrivateGuildChannel(require));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user