Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,369 @@
|
||||
/* Metro module 15213; source: components_native/channel_settings/ChannelSettingsChangeCategory.tsx; dependencies: [57, 862, 6, 7, 15, 17, 18, 31, 1379, 5098, 1867, 3784, 3793, 1878, 661, 33, 4501, 697, 5099, 11879, 3789, 6593, 4647, 1244, 4805, 6238, 6231, 7972, 4572, 4573, 3868, 566, 1484, 44, 2] */
|
||||
function _fun116362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:6, offset: 0x024866f1, size: 567 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
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(862) /* metro dependency 862 */;
|
||||
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_8 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_9 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_10 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
|
||||
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(661) /* metro dependency 661: Constants */).Permissions;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_18 = value2.jsx;
|
||||
const env0_19 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
object3 = {};
|
||||
const object4 = {flex: 1};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingTop = PX_16;
|
||||
object3.screenContainer = object4;
|
||||
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
||||
object3.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
|
||||
const env0_20 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
|
||||
const Component = value.Component;
|
||||
value = _fun116366(Component);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeCategory.tsx');
|
||||
exports.default = ConnectedChannelSettingsChangeCategory;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_116363() { // fn#116363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:293, offset: 0x02486928, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_116363_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun116366(a0) { // fn#116366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:725, offset: 0x0248698a, size: 174 bytes, params: 2, frame: 16
|
||||
const closure = ChannelSettingsChangeCategory;
|
||||
env0_10(closure, a0);
|
||||
return env0_7(closure, [{key: 'shouldComponentUpdate', value: function() {
|
||||
return !this.state.submitting;
|
||||
}}, {key: 'handleSetCategory', value: value_116371}, {key: 'renderCategory', value: value_116383},
|
||||
{key: 'renderCategories', value: value_116385}, {key: 'render', value: value_116386}]);
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsChangeCategory({channelId}) { // fn#116388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:4270, offset: 0x02487481, size: 152 bytes, params: 2, frame: 18
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null,
|
||||
'ConnectedChannelSettingsChangeCategory: channel cannot be undefined');
|
||||
return ((Component) => <Component channel={channel} navigation={value2} />)(env0_21);
|
||||
}
|
||||
|
||||
function ChannelSettingsChangeCategory(a0) { // fn#116367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:737, offset: 0x02486a38, size: 270 bytes, params: 2, frame: 22
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
env1_6(this, ChannelSettingsChangeCategory);
|
||||
let object = [a0];
|
||||
const value3 = env1_9(ChannelSettingsChangeCategory);
|
||||
const value6 = env1_8(this, _isNativeReflectConstruct_116363() ? global.Reflect.construct(value3, object,
|
||||
env1_9(this).constructor) : value3.apply(this, object));
|
||||
const getGuild = GuildStore.getGuild;
|
||||
let channel = a0.channel;
|
||||
let getGuildId = channel.getGuildId;
|
||||
const env0_0 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, channel, [])]);
|
||||
const getCategories = GuildCategoryStore.getCategories;
|
||||
channel = a0.channel;
|
||||
getGuildId = channel.getGuildId;
|
||||
const value7 = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
|
||||
object = {};
|
||||
object.category = ChannelStore.getChannel(a0.channel.parent_id);
|
||||
object.categories = value7._categories.map(function(a0) {
|
||||
return a0.channel;
|
||||
}).filter(_fun116369);
|
||||
object.submitting = false;
|
||||
value6.state = object;
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_116371(a0) { // fn#116371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1496, offset: 0x02486bd2, size: 617 bytes, params: 2, frame: 25
|
||||
let value = a0;
|
||||
const props = this.props;
|
||||
const channel = props.channel;
|
||||
const env0_2 = props.navigation;
|
||||
let getChannel = ChannelStore.getChannel;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [value]);
|
||||
let getGuildId = channel.getGuildId;
|
||||
const value4 = Reflect.apply(getGuildId, channel, []);
|
||||
const value5 = null;
|
||||
if (value5 == value4) {
|
||||
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Invalid guild_id');
|
||||
}
|
||||
const r5 = value === 'null' ? value5 : value;
|
||||
const getCategories = GuildCategoryStore.getCategories;
|
||||
getGuildId = channel.getGuildId;
|
||||
value = Reflect.apply(getCategories, GuildCategoryStore, [Reflect.apply(getGuildId, channel, [])]);
|
||||
const value6 = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, value,
|
||||
function(a0) {
|
||||
return a0.channel.type === channel.type;
|
||||
});
|
||||
const value7 = value6.find(function(a0) {
|
||||
return a0.channel.id === channel.id;
|
||||
});
|
||||
if (value5 == value7) {
|
||||
throw new global.Error('ChannelSettingsChangeCategory.handleSetCategory: Could not find original channel.');
|
||||
}
|
||||
const object2 = {};
|
||||
value._categories.forEach(_fun116374);
|
||||
value6.forEach(_fun116375);
|
||||
const String = global.String;
|
||||
object2[String(r5)].push(value7);
|
||||
value = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(value._categories, object2);
|
||||
const dragAndDropUtilsModule = require(11879) /* metro dependency 11879: DragAndDropUtils */;
|
||||
value = dragAndDropUtilsModule.calculatePositionDeltas({oldOrdering: value6, newOrdering: value,
|
||||
idGetter: function(a0) {
|
||||
return a0.channel.id;
|
||||
}, existingPositionGetter: function(a0) {
|
||||
return a0.channel.position;
|
||||
}});
|
||||
if (value.length > 0) {
|
||||
value.find(_fun116378);
|
||||
} else {
|
||||
value.push({id: channel.id, parent_id: r5});
|
||||
}
|
||||
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
let areChannelsLocked = value.areChannelsLocked;
|
||||
const env0_8 = Reflect.apply(areChannelsLocked, value, [channel, value3]);
|
||||
value = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
areChannelsLocked = value.areChannelsLocked;
|
||||
getChannel = ChannelStore.getChannel;
|
||||
const env0_9 = Reflect.apply(areChannelsLocked, value, [channel, Reflect.apply(getChannel, ChannelStore,
|
||||
[channel.parent_id])]);
|
||||
this.setState({submitting: true}, _fun116381);
|
||||
}
|
||||
|
||||
function value_116383(a0) { // fn#116383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3074, offset: 0x0248712e, size: 87 bytes, params: 2, frame: 17
|
||||
const env0_1 = a0;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
label={a0.name}
|
||||
onPress={onPress_116384}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function value_116385() { // fn#116385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3207, offset: 0x024871a2, size: 205 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const value3 = env1_5(this.state.categories).slice(0);
|
||||
const category = this.state.category;
|
||||
const value4 = null;
|
||||
if (value4 != category) {
|
||||
value3.splice(value3.indexOf(category), 1);
|
||||
}
|
||||
if (value4 != value3[0] && value3[0].id === 'null') {
|
||||
value3.shift();
|
||||
}
|
||||
const value8 = value3.map(this.renderCategory, this);
|
||||
if (value8.length > 0) {
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{value8}
|
||||
</TableRowGroup>
|
||||
);
|
||||
} else {
|
||||
return value4;
|
||||
}
|
||||
}
|
||||
|
||||
function value_116386() { // fn#116386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3488, offset: 0x0248726f, size: 530 bytes, params: 1, frame: 34
|
||||
var environment;
|
||||
var r19;
|
||||
var intl2;
|
||||
const category = this.state.category;
|
||||
const value = environment.__proto__;
|
||||
const property = env1_4(this.state.categories, 1)[0];
|
||||
const value3 = env1_20(this.context);
|
||||
const Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
const screenContainer = value3.screenContainer;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
const stackPadding = value3.stackPadding;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const OqccVl = (require(1244) /* metro dependency 1244: indexNative */).t.OqccVl;
|
||||
const value4 = null;
|
||||
if (value4 != category) {
|
||||
r19 = category.name;
|
||||
} else {
|
||||
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r19 = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.GSfOoo);
|
||||
}
|
||||
const items2 = [<Text variant="text-md/medium" color="text-muted">{Reflect.apply(formatToPlainString, intl, [OqccVl,
|
||||
{categoryName: r19}])}</Text>];
|
||||
items2[1] = value4 != property ? property.id !== 'null' ? value4 : value4 != category ? ((TableRowGroup) => <TableRowGroup hasIcons={false}>{((TableRow) => <TableRow label={property.name} onPress={onPress_116387} key={property.id} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup) : value4 : value4;
|
||||
items2[2] = this.renderCategories();
|
||||
return (
|
||||
<Form style={screenContainer}>
|
||||
<Stack style={stackPadding} spacing={PX_24}>
|
||||
{items2}
|
||||
</Stack>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116369(a0) { // fn#116369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1196, offset: 0x02486b46, size: 121 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
let value = a0.id === 'null';
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = PermissionStore.can(Permissions.MANAGE_CHANNELS, env0_0);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
r0 = !r0 ? PermissionStore.can(Permissions.MANAGE_CHANNELS, a0) && PermissionStore.can(Permissions.VIEW_CHANNEL,
|
||||
a0) : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116374({channel}) { // fn#116374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:1989, offset: 0x02486e79, size: 30 bytes, params: 2, frame: 3
|
||||
const binding = env0_5;
|
||||
const id = channel.id;
|
||||
const items2 = [];
|
||||
binding[id] = items2;
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun116375(a0) { // fn#116375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2028, offset: 0x02486e97, size: 90 bytes, params: 2, frame: 14
|
||||
var r0;
|
||||
var binding;
|
||||
var String;
|
||||
var parent_id;
|
||||
var property;
|
||||
const id = a0.channel.id;
|
||||
var value;
|
||||
const value2 = id !== channel.id;
|
||||
if (value2) {
|
||||
binding = env0_5;
|
||||
String = global.String;
|
||||
parent_id = a0.channel.parent_id;
|
||||
value = undefined;
|
||||
property = binding[String(parent_id)];
|
||||
r0 = property == null ? value : property.push(a0);
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116378(a0) { // fn#116378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2347, offset: 0x02486f00, size: 45 bytes, params: 2, frame: 4
|
||||
var r0;
|
||||
const value2 = a0.id === channel.id;
|
||||
if (value2) {
|
||||
a0.parent_id = env0_0;
|
||||
env0_6 = a0;
|
||||
r0 = true;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function saveUpdates() { // fn#116379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2532, owner: value_116371.saveUpdates, offset: 0x02486f2d, size: 69 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = Reflect.apply((importDefault(6593) /* metro dependency 6593: GuildActionCreators */).batchChannelUpdate,
|
||||
value, [env0_4, env0_7]);
|
||||
return value.then(function() {
|
||||
return navigation.pop();
|
||||
});
|
||||
}
|
||||
|
||||
function _fun116381() { // fn#116381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2620, offset: 0x02486f85, size: 398 bytes, params: 1, frame: 30
|
||||
var environment;
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var show;
|
||||
var object3;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var format;
|
||||
var property;
|
||||
var object4;
|
||||
var moduleValue;
|
||||
if (env0_3 == null) {
|
||||
saveUpdates();
|
||||
} else if (env0_9) {
|
||||
if (env0_8) {
|
||||
saveUpdates();
|
||||
} else {
|
||||
value2 = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
show = defaultImport.show;
|
||||
object3 = {};
|
||||
object3.title = intl.string(t.YWMtRe);
|
||||
format = intl.format;
|
||||
property = t['iKW+jY'];
|
||||
object4 = {};
|
||||
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
object4.channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore, true);
|
||||
object4.categoryName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(env0_3,
|
||||
|
||||
UserStore, RelationshipStore);
|
||||
object3.body = Reflect.apply(format, intl, [property, object4]);
|
||||
object3.confirmText = intl.string(t.eW8Gy4);
|
||||
object3.cancelText = intl.string(t.s4uM3b);
|
||||
object3.onConfirm = onConfirm_116382;
|
||||
object3.onCancel = saveUpdates;
|
||||
Reflect.apply(show, defaultImport, [object3]);
|
||||
}
|
||||
} else {
|
||||
saveUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
function value_116383OnPress() { // fn#116384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:3135, owner: value_116383.onPress, offset: 0x02487185, size: 29 bytes, params: 1, frame: 11
|
||||
const binding = env0_0;
|
||||
return binding.handleSetCategory(env0_1.id);
|
||||
}
|
||||
|
||||
function onConfirm_116382() { // fn#116382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15410:2962, offset: 0x02487113, size: 27 bytes, params: 1, frame: 10
|
||||
env1_6.lock_permissions = true;
|
||||
saveUpdates();
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
/* Metro module 15216; source: components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx; dependencies: [57, 31, 27, 1379, 33, 4501, 697, 8148, 7988, 1244, 1389, 7987, 15179, 8941, 4573, 6231, 5475, 15217, 15218, 566, 2] */
|
||||
function _fun116424(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:6, offset: 0x02488a86, size: 405 bytes, params: 8, frame: 23
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const closure = ChannelSettingsChangeDefaultForumLayout;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {flex: 1};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object5.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.paddingTop = PX_16;
|
||||
object4.container = object5;
|
||||
const object6 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.paddingTop = PX_8;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingBottom = PX_16;
|
||||
object4.description = object6;
|
||||
object4.thumbnailImagePortrait = {alignSelf: 'center'};
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeDefaultForumLayout.tsx');
|
||||
exports.default = ConnectedChannelSettingsChangeDefaultForumLayout;
|
||||
exports.ChannelSettingsChangeDefaultForumLayout = closure;
|
||||
}
|
||||
|
||||
function ChannelSettingsChangeDefaultForumLayout({channel}) { // fn#116425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:457, offset: 0x02488c1b, size: 903 bytes, params: 2, frame: 30
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const value3 = env0_3(Reflect.apply(useState, binding, [channel.defaultForumLayout]), 2);
|
||||
const property = value3[0];
|
||||
const env0_1 = value3[1];
|
||||
const value4 = env0_4.useCallback(_fun116426, [channel.id]);
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.mFMDSq]);
|
||||
object.defaultValue = property ?? (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout.LIST;
|
||||
object.onChange = value4;
|
||||
object.hasIcons = true;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
const object5 = {};
|
||||
const GridSquareIcon = (require(15179) /* metro dependency 15179: GridSquareIcon */).GridSquareIcon;
|
||||
object5.icon = <GridSquareIcon />;
|
||||
object5.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['U+rQfW']);
|
||||
const ForumLayout = (require(1389) /* metro dependency 1389: ForumLayout */).ForumLayout;
|
||||
let GRID = ForumLayout.GRID;
|
||||
object5.value = GRID;
|
||||
const tableRadioRow = <TableRadioRow {...object5} />;
|
||||
const object6 = {};
|
||||
const ListViewIcon = (require(8941) /* metro dependency 8941: ListViewIcon */).ListViewIcon;
|
||||
object6.icon = <ListViewIcon />;
|
||||
object6.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuHPRX);
|
||||
const LIST = ForumLayout.LIST;
|
||||
object6.value = LIST;
|
||||
const items2 = [<TableRadioGroup {...object}>{tableRadioRow}<TableRadioRow {...object6} /></TableRadioGroup>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
string = intl.string;
|
||||
const MbX5Hu = (require(1244) /* metro dependency 1244: indexNative */).t.MbX5Hu;
|
||||
items2[1] = <Text style={styles.description} variant="text-sm/medium" color="text-muted">{Reflect.apply(string,
|
||||
intl, [MbX5Hu])}</Text>;
|
||||
const TableRowGroupTitle = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle;
|
||||
items2[2] = <TableRowGroupTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.e4oMl4)} />;
|
||||
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
GRID = ForumLayout.GRID;
|
||||
items2[3] = <FastImage style={styles.thumbnailImagePortrait} source={property === GRID ? importDefault(15217) /* metro dependency 15217 */ : importDefault(15218) /* metro dependency 15218 */} />;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsChangeDefaultForumLayout({channelId}) { // fn#116427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:1626, offset: 0x02489003, size: 100 bytes, params: 2, frame: 16
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
return channel == null ? null : <ChannelSettingsChangeDefaultForumLayout channel={channel} />;
|
||||
}
|
||||
|
||||
function _fun116426(a0) { // fn#116426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15413:604, offset: 0x02488fa2, size: 97 bytes, params: 2, frame: 19
|
||||
env0_1(a0);
|
||||
(importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */).updateChannel({defaultForumLayout: a0});
|
||||
const defaultImport2 = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
|
||||
defaultImport2.saveChannel(channel.id, {defaultForumLayout: a0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
/* Metro module 15214; source: components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx; dependencies: [862, 6, 7, 15, 17, 18, 31, 1379, 15173, 33, 4501, 697, 1244, 8148, 7987, 7988, 7972, 3868, 566, 44, 2] */
|
||||
function _fun116390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:6, offset: 0x02487519, size: 409 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(862) /* metro dependency 862 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const regionStore = importDefault(15173) /* metro dependency 15173: RegionStore */;
|
||||
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
const object = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const env0_12 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{form: object}]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun116394(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsChangeRTCRegion.tsx');
|
||||
exports.default = ConnectedChannelSettingsChangeRTCRegion;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_116391() { // fn#116391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:202, offset: 0x024876b2, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_116391_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun116394(a0) { // fn#116394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:573, offset: 0x02487714, size: 153 bytes, params: 2, frame: 16
|
||||
const closure = ChannelSettingsChangeRTCRegion;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'handleSetRegion', value: value_116399}, {key: 'renderRegion', value: value_116401},
|
||||
{key: 'renderRegions', value: value_116402}, {key: 'render', value: value_116404}]);
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsChangeRTCRegion({channelId}) { // fn#116405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:2249, offset: 0x02487ba5, size: 125 bytes, params: 2, frame: 17
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null,
|
||||
'ConnectedChannelSettingsChangeRTCRegion: channel cannot be undefined');
|
||||
return ((Component) => <Component channel={channel} />)(env0_13);
|
||||
}
|
||||
|
||||
function ChannelSettingsChangeRTCRegion(a0) { // fn#116395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:585, offset: 0x024877ad, size: 149 bytes, params: 2, frame: 20
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_4;
|
||||
binding(this, ChannelSettingsChangeRTCRegion);
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, items2);
|
||||
value = env1_7(ChannelSettingsChangeRTCRegion);
|
||||
binding = env1_6;
|
||||
if (_isNativeReflectConstruct_116391()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items2, env1_7(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items2);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.state = _fun116396();
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_116399(a0) { // fn#116399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1403, offset: 0x02487991, size: 131 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
let value = a0;
|
||||
const state = this.state;
|
||||
const value2 = null;
|
||||
const value3 = 'AUTOMATIC_RTC_REGION';
|
||||
state.selectedRegionId = value2 != value ? value : value3;
|
||||
const r6 = value !== value3 ? value : value2;
|
||||
value = environment.__proto__;
|
||||
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
|
||||
value.updateChannel({rtcRegion: r6});
|
||||
this.setState({submitting: true}, _fun116400);
|
||||
}
|
||||
|
||||
function value_116401(a0) { // fn#116401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1634, offset: 0x02487a5c, size: 72 bytes, params: 2, frame: 16
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
label={a0.name}
|
||||
value={a0.id}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function value_116402() { // fn#116402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1739, offset: 0x02487aa4, size: 144 bytes, params: 1, frame: 17
|
||||
const value3 = env1_3(this.state.regions).slice(0);
|
||||
const value4 = value3.map(this.renderRegion, this);
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
return (
|
||||
<TableRadioGroup
|
||||
defaultValue={this.state.selectedRegionId}
|
||||
onChange={onChange_116403}
|
||||
hasIcons={false}
|
||||
>
|
||||
{value4}
|
||||
</TableRadioGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function value_116404() { // fn#116404, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1974, offset: 0x02487b4d, size: 88 bytes, params: 1, frame: 16
|
||||
const value2 = env1_12(this.context);
|
||||
const Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
return (
|
||||
<Form style={value2.form}>
|
||||
{this.renderRegions()}
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116396() { // fn#116396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:870, offset: 0x02487842, size: 272 bytes, params: 1, frame: 21
|
||||
var push;
|
||||
var value6;
|
||||
var items2;
|
||||
var value7;
|
||||
const object2 = {'regions': null, 'submitting': false, 'selectedRegionId': 'AUTOMATIC_RTC_REGION'};
|
||||
object2.regions = [];
|
||||
const value = 'AUTOMATIC_RTC_REGION';
|
||||
const getRegions = RegionStore.getRegions;
|
||||
const channel = env0_0.props.channel;
|
||||
const getGuildId = channel.getGuildId;
|
||||
const value4 = Reflect.apply(getRegions, RegionStore, [Reflect.apply(getGuildId, channel, [])]);
|
||||
const value5 = undefined;
|
||||
const intl = require(dependencyMap[12]).intl;
|
||||
const string = intl.string;
|
||||
const JEmsap = require(dependencyMap[12]).t.JEmsap;
|
||||
const items3 = [{'id': 'AUTOMATIC_RTC_REGION', 'name': null, 'sample_hostname': '', 'sample_port': 0, 'vip': false,
|
||||
'deprecated': false, 'optimal': false, 'hidden': false, name: Reflect.apply(string, intl, [JEmsap])}];
|
||||
if (value4 != null) {
|
||||
push = items3.push;
|
||||
value6 = value4.filter(function(a0) {
|
||||
return !a0.deprecated && !a0.hidden;
|
||||
});
|
||||
items2 = [];
|
||||
arraySpread(items2, value6, 0, dependencyMap);
|
||||
apply(push, items2, items3, dependencyMap);
|
||||
value7 = value4.find(_fun116398);
|
||||
object2.selectedRegionId = (value7 == null ? value5 : value7.id) ?? value;
|
||||
}
|
||||
object2.regions = items3;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun116400() { // fn#116400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1540, offset: 0x02487a14, size: 72 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(8148) /* metro dependency 8148: ChannelSettingsActionCreators */;
|
||||
value.saveChannel(env0_0.props.channel.id, {rtcRegion: env0_1});
|
||||
}
|
||||
|
||||
function value_116402OnChange(a0) { // fn#116403, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1900, owner: value_116402.onChange, offset: 0x02487b34, size: 25 bytes, params: 2, frame: 11
|
||||
return env0_0.handleSetRegion(a0);
|
||||
}
|
||||
|
||||
function _fun116398({id}) { // fn#116398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15411:1213, offset: 0x0248796c, size: 37 bytes, params: 2, frame: 2
|
||||
return id === env1_0.props.channel.rtcRegion;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 15174; source: components_native/channel_settings/ChannelSettingsConstants.tsx; dependencies: [2] */
|
||||
function _fun115944(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15371:6, offset: 0x024755b3, size: 92 bytes, params: 8, frame: 16
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsConstants.tsx');
|
||||
exports.ChannelSettingsAutoFocusElement = {CHANNEL_NAME: 'channel-name'};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
/* Metro module 15183; source: components_native/channel_settings/ChannelSettingsInstantInvites.tsx; dependencies: [57, 31, 27, 8149, 1379, 661, 33, 4501, 697, 1585, 566, 8148, 12132, 1305, 12146, 12147, 1244, 5460, 15184, 8671, 2] */
|
||||
function _fun115996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:6, offset: 0x02477699, size: 359 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelSettingsStore = importDefault(8149) /* metro dependency 8149: ChannelSettingsStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingHorizontal = PX_16;
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
object4.flex = 1;
|
||||
object3.content = object4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.gap = {height: PX_16};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object3]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsInstantInvites.tsx');
|
||||
exports.default = ConnectedChannelSettingsInstantInvites;
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsInstantInvites() { // fn#115997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:494, offset: 0x02477800, size: 845 bytes, params: 1, frame: 29
|
||||
var r7;
|
||||
var r1;
|
||||
var r0;
|
||||
var EmptyState;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items2;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const binding = env0_4;
|
||||
const [property, env0_1] = env0_3(binding.useState(undefined), 2);
|
||||
const value4 = binding.useCallback(_fun115998, [styles]);
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelSettingsStore],
|
||||
function() {
|
||||
return ChannelSettingsStore.getChannel();
|
||||
});
|
||||
const {invites,
|
||||
loading} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelSettingsStore],
|
||||
function() {
|
||||
return ChannelSettingsStore.getInvites();
|
||||
});
|
||||
const value8 = binding.useMemo(_fun116005, [binding.useMemo(_fun116001, [invites]),
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ChannelStore], _fun116003)]);
|
||||
items = [value8.length];
|
||||
binding.useEffect(function() {
|
||||
importDefault(dependencyMap[11]).setSection(ChannelSettingsSections.INSTANT_INVITES);
|
||||
}, []);
|
||||
const value9 = binding.useCallback(_fun116009, [value8]);
|
||||
if (loading) {
|
||||
if (loading) {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
|
||||
if (value8.length > 0) {
|
||||
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
|
||||
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = null;
|
||||
}
|
||||
items2[1] = r7;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r1 = value;
|
||||
} else if (property == null) {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
|
||||
if (value8.length > 0) {
|
||||
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
|
||||
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = null;
|
||||
}
|
||||
items2[1] = r7;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r1 = value;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
|
||||
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else if (value8.length !== 0) {
|
||||
if (loading) {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
|
||||
if (value8.length > 0) {
|
||||
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
|
||||
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = null;
|
||||
}
|
||||
items2[1] = r7;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r1 = value;
|
||||
} else if (property == null) {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
items2 = [((SceneLoadingIndicator) => <SceneLoadingIndicator />)((require(5460) /* metro dependency 5460: SceneLoadingIndicatorNative */).SceneLoadingIndicator)];
|
||||
if (value8.length > 0) {
|
||||
value = importDefault(15184) /* metro dependency 15184: InstantInviteSelfMeasurer */;
|
||||
value = ((Component) => <Component item={value8[0]} onMeasured={value4} />)(value);
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = null;
|
||||
}
|
||||
items2[1] = r7;
|
||||
value = <View {...viewBindingProps}>{items2}</View>;
|
||||
r1 = value;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.content};
|
||||
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
|
||||
value = <View {...viewBindingProps}>{((Component) => <Component sections={items} estimatedListSize="windowSize" itemSize={property} renderItem={value9} insetStart={styles.gap.height} insetEnd={bottom} />)(value)}</View>;
|
||||
r1 = value;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
r0 = <EmptyState lightSource={importDefault(12146) /* metro dependency 12146 */} darkSource={importDefault(12147) /* metro dependency 12147 */} title={intl.string(t['+nLJkZ'])} body={intl.string(t.F53CAc)} />;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun115998(a0) { // fn#115998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:634, offset: 0x02477b4d, size: 37 bytes, params: 2, frame: 11
|
||||
env0_1(a0 + styles.gap.height);
|
||||
}
|
||||
|
||||
function _fun116001() { // fn#116001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:818, offset: 0x02477b97, size: 47 bytes, params: 1, frame: 11
|
||||
const Object = global.Object;
|
||||
return Object.values(invites).sort(function(a0, a1) {
|
||||
var r2;
|
||||
var property = a0.inviter;
|
||||
var value = undefined;
|
||||
r2 = property == null ? value : property.username;
|
||||
var value2 = '';
|
||||
var value3 = (r2 ?? value2).toLowerCase();
|
||||
property = a1.inviter;
|
||||
return value3.localeCompare(((property == null ? value : property.username) ?? value2).toLowerCase());
|
||||
});
|
||||
}
|
||||
|
||||
function _fun116003() { // fn#116003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1082, offset: 0x02477c34, size: 67 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
var r0;
|
||||
var value2;
|
||||
var value;
|
||||
if (channel != null) {
|
||||
value2 = environment.__proto__;
|
||||
value = ChannelStore.getSortedLinkedChannelsForGuild(channel.guild_id);
|
||||
value = value.filter(function({id}) {
|
||||
return id === channel.id;
|
||||
});
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116005() { // fn#116005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1183, offset: 0x02477c91, size: 69 bytes, params: 1, frame: 15
|
||||
let binding = env0_4;
|
||||
const value2 = binding.map(function(a0) {
|
||||
return {type: 'invite', data: a0};
|
||||
});
|
||||
const items2 = [];
|
||||
const value3 = arraySpread(items2, value2, 0, binding);
|
||||
binding = env0_5;
|
||||
arraySpread(items2, binding.map(function(a0) {
|
||||
return {type: 'channel', data: a0};
|
||||
}), value3, binding);
|
||||
return items2;
|
||||
}
|
||||
|
||||
function _fun116009(a0, a1) { // fn#116009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15380:1375, offset: 0x02477d2c, size: 130 bytes, params: 3, frame: 15
|
||||
var r0;
|
||||
var value;
|
||||
const property = env0_6[a1];
|
||||
if (property.type === 'invite') {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(12132) /* metro dependency 12132: InstantInvite */;
|
||||
value = ((Component) => <Component invite={property.data} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
const LinkedChannelInvite = (require(12132) /* metro dependency 12132: InstantInvite */).LinkedChannelInvite;
|
||||
value = <LinkedChannelInvite channel={property.data} />;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
/* Metro module 15200; source: components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx; dependencies: [31, 1379, 661, 33, 1484, 6777, 6231, 1244, 6238, 1305, 1423, 4501, 697, 566, 7972, 4572, 15117, 15201, 2] */
|
||||
function _fun116242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:6, offset: 0x024826a4, size: 286 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelSettingsSections;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {flex: 1};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingTop = PX_16;
|
||||
const env0_7 = Reflect.apply(createStyles, value, [{screenContainer: object}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsIntegrationsOverview.tsx');
|
||||
exports.default = ConnectedChannelSettingsIntegrationsOverview;
|
||||
}
|
||||
|
||||
function LinkedLobbyFormSection({channel}) { // fn#116243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:175, offset: 0x024827c2, size: 380 bytes, params: 2, frame: 30
|
||||
var r0;
|
||||
var TableRowGroup;
|
||||
var object2;
|
||||
var intl;
|
||||
var TableRow;
|
||||
var Avatar;
|
||||
var value;
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value4 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(channel.linkedLobby?.application_id);
|
||||
if (value4 == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
object2 = {};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oAvIAg);
|
||||
object2.hasIcons = true;
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var tableRowProps = {label: value4.name};
|
||||
Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
tableRowProps.icon = <Avatar source={value.getApplicationIconSource({id: value4.id,
|
||||
icon: value4.icon})} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} />;
|
||||
tableRowProps.arrow = true;
|
||||
tableRowProps.onPress = onPress_116244;
|
||||
value = <TableRowGroup {...object2}><TableRow {...tableRowProps} /></TableRowGroup>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsIntegrationsOverview({channelId, canManageWebhooks, canUnlinkLobby}) { // fn#116245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:957, offset: 0x02482973, size: 748 bytes, params: 2, frame: 37
|
||||
var r11;
|
||||
var r9;
|
||||
var r0;
|
||||
var Form;
|
||||
var Stack;
|
||||
var object;
|
||||
var space;
|
||||
var TableRowGroup;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var object5;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var object6;
|
||||
var items2;
|
||||
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const styles = useStyles();
|
||||
if (channel == null) {
|
||||
r0 = null;
|
||||
} else {
|
||||
Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
var formProps = {style: styles.screenContainer};
|
||||
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
object = {};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object.style = {paddingHorizontal: space.PX_12};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
object.spacing = space.PX_24;
|
||||
if (canManageWebhooks) {
|
||||
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
items3 = [<TableRow label={intl.string(t.jp25Id)} subLabel={intl.string(t.mKIOkI)} icon={((WebhookIcon) => <WebhookIcon />)((require(15117) /* metro dependency 15117: WebhookIcon */).WebhookIcon)} arrow onPress={onPress_116247} />];
|
||||
items3[1] = <TableRow label={intl.string(t.OrV60r)} subLabel={intl.string(t.rQREJl)} icon={((ChannelsFollowedIcon) => <ChannelsFollowedIcon />)((require(15201) /* metro dependency 15201: ChannelsFollowedIcon */).ChannelsFollowedIcon)} arrow onPress={onPress_116248} />;
|
||||
r11 = <TableRowGroup hasIcons>{items3}</TableRowGroup>;
|
||||
} else {
|
||||
r11 = canManageWebhooks;
|
||||
}
|
||||
items2 = [r11];
|
||||
r9 = canUnlinkLobby && channel.linkedLobby != null;
|
||||
r9 = r9 && <LinkedLobbyFormSection channel={channel} />;
|
||||
items2[1] = r9;
|
||||
r0 = <Form {...formProps}><Stack {...object}>{items2}</Stack></Form>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function LinkedLobbyFormSectionOnPress() { // fn#116244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:628, owner: LinkedLobbyFormSection.onPress, offset: 0x0248293e, size: 53 bytes, params: 1, frame: 14
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
|
||||
Reflect.apply(push, binding, [EDIT_LINKED_LOBBY, {channel: channel, numScreensToPop: 1}]);
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsIntegrationsOverviewOnPress() { // fn#116247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1540, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c5f, size: 32 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
|
||||
return Reflect.apply(push, binding, [WEBHOOKS]);
|
||||
}
|
||||
|
||||
function ConnectedChannelSettingsIntegrationsOverviewOnPress_116248() { // fn#116248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15397:1734, owner: ConnectedChannelSettingsIntegrationsOverview.onPress, offset: 0x02482c7f, size: 32 bytes, params: 1, frame: 11
|
||||
const binding = env0_1;
|
||||
const push = binding.push;
|
||||
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
|
||||
return Reflect.apply(push, binding, [CHANNELS_FOLLOWED]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
/* Metro module 15171; source: components_native/channel_settings/ChannelSettingsModal.tsx; dependencies: [31, 27, 661, 9615, 33, 4501, 697, 15172, 1244, 10935, 15107, 15182, 15183, 15185, 15190, 15191, 15200, 15203, 15210, 15212, 15213, 15214, 15215, 15216, 2] */
|
||||
function _fun115812(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:6, offset: 0x0246e727, size: 325 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
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;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_4 = value.ChannelSettingsSections;
|
||||
const env0_5 = value.SearchTypes;
|
||||
const env0_6 = value.WebhookTypes;
|
||||
const env0_7 = (require(9615) /* metro dependency 9615: SearchConstants */).SearchTabs;
|
||||
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStyles = (require(4501) /* metro dependency 4501: createStyles */).createStyles;
|
||||
object2 = {};
|
||||
let MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.container = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
|
||||
object2.pinsScreen = {flex: 1, backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
|
||||
value = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsModal.tsx');
|
||||
exports.useChannelSettingsScreensStyles = value;
|
||||
exports.getChannelSettingsScreens = getChannelSettingsScreens;
|
||||
}
|
||||
|
||||
function getChannelSettingsScreens(a0, a1, a2) { // fn#115813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:570, offset: 0x0246e86c, size: 1165 bytes, params: 4, frame: 21
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const object2 = {};
|
||||
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
|
||||
object2[OVERVIEW] = {render: render_115814};
|
||||
const NOTIFICATIONS = ChannelSettingsSections.NOTIFICATIONS;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object2[NOTIFICATIONS] = {title: Reflect.apply(string, intl, [t.h850Ss]), render: render_115815};
|
||||
const PINNED_MESSAGES = ChannelSettingsSections.PINNED_MESSAGES;
|
||||
const object3 = {};
|
||||
object3.title = intl.string(t['mp1N/2']);
|
||||
object3.render = render_115816;
|
||||
object2[PINNED_MESSAGES] = object3;
|
||||
const PINNED_CHAT = ChannelSettingsSections.PINNED_CHAT;
|
||||
object2[PINNED_CHAT] = {postponeRender: true, render: render_115817};
|
||||
const INSTANT_INVITES = ChannelSettingsSections.INSTANT_INVITES;
|
||||
object2[INSTANT_INVITES] = {title: intl.string(t.ngRFjZ), postponeRender: true, render: render_115818};
|
||||
const PERMISSIONS = ChannelSettingsSections.PERMISSIONS;
|
||||
object2[PERMISSIONS] = {title: intl.string(t.xrmhRX), render: render_115819};
|
||||
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
|
||||
object2[NEW_PERMISSION] = {title: intl.string(t.vPHdP5), postponeRender: true, render: render_115820};
|
||||
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
|
||||
string = intl.string;
|
||||
const D4p9TR = t.D4p9TR;
|
||||
object2[PERMISSION_OVERRIDES] = {title: Reflect.apply(string, intl, [D4p9TR]), render: render_115821};
|
||||
const INTEGRATIONS = ChannelSettingsSections.INTEGRATIONS;
|
||||
string = intl.string;
|
||||
const CIsNZw = t.CIsNZw;
|
||||
object2[INTEGRATIONS] = {title: Reflect.apply(string, intl, [CIsNZw]), render: render_115822};
|
||||
const WEBHOOKS = ChannelSettingsSections.WEBHOOKS;
|
||||
object2[WEBHOOKS] = {title: intl.string(t.jp25Id), render: render_115823};
|
||||
const EDIT_WEBHOOK = ChannelSettingsSections.EDIT_WEBHOOK;
|
||||
const object5 = {};
|
||||
object5.title = intl.string(t['6SE3L3']);
|
||||
object5.render = render_115824;
|
||||
object2[EDIT_WEBHOOK] = object5;
|
||||
const EDIT_LINKED_LOBBY = ChannelSettingsSections.EDIT_LINKED_LOBBY;
|
||||
string = intl.string;
|
||||
const OJknhi = t.OJknhi;
|
||||
object2[EDIT_LINKED_LOBBY] = {title: Reflect.apply(string, intl, [OJknhi]), render: render_115825};
|
||||
const CHANNELS_FOLLOWED = ChannelSettingsSections.CHANNELS_FOLLOWED;
|
||||
string = intl.string;
|
||||
const OrV60r = t.OrV60r;
|
||||
object2[CHANNELS_FOLLOWED] = {title: Reflect.apply(string, intl, [OrV60r]), render: render_115826};
|
||||
const CHANGE_CATEGORY = ChannelSettingsSections.CHANGE_CATEGORY;
|
||||
const object6 = {};
|
||||
object6.title = intl.string(t['+caQHK']);
|
||||
object6.render = render_115827;
|
||||
object2[CHANGE_CATEGORY] = object6;
|
||||
const CHANGE_RTC_REGION = ChannelSettingsSections.CHANGE_RTC_REGION;
|
||||
const object7 = {};
|
||||
object7.title = intl.string(t['Ms8bX+']);
|
||||
object7.render = render_115828;
|
||||
object2[CHANGE_RTC_REGION] = object7;
|
||||
const EDIT_FORUM_TAG = ChannelSettingsSections.EDIT_FORUM_TAG;
|
||||
object2[EDIT_FORUM_TAG] = {render: render_115829};
|
||||
const DEFAULT_FORUM_LAYOUT = ChannelSettingsSections.DEFAULT_FORUM_LAYOUT;
|
||||
const object8 = {};
|
||||
object8.title = intl.string(t['kQvoC/']);
|
||||
object8.render = render_115830;
|
||||
object2[DEFAULT_FORUM_LAYOUT] = object8;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender(a0) { // fn#115814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:640, owner: getChannelSettingsScreens.render, offset: 0x0246ecf9, size: 75 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} autoFocusElement={a0?.autoFocusElement} />)(importDefault(15172) /* metro dependency 15172: ChannelSettingsOverview */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115815() { // fn#115815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:790, owner: getChannelSettingsScreens.render, offset: 0x0246ed44, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} />)(importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115816() { // fn#115816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:888, owner: getChannelSettingsScreens.render, offset: 0x0246ed76, size: 131 bytes, params: 1, frame: 17
|
||||
const object2 = {};
|
||||
const GUILD_CHANNEL = SearchTypes.GUILD_CHANNEL;
|
||||
object2.type = GUILD_CHANNEL;
|
||||
object2.guildId = require;
|
||||
object2.channelId = env0_0;
|
||||
const pinsScreen = importDefault.pinsScreen;
|
||||
const PinsScreen = importDefault(15107) /* metro dependency 15107: PinsScreen */;
|
||||
const PINS = SearchTabs.PINS;
|
||||
return (
|
||||
<View style={pinsScreen}>
|
||||
<PinsScreen
|
||||
searchContext={object2}
|
||||
tab={PINS}
|
||||
isFocused
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115817() { // fn#115817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1088, owner: getChannelSettingsScreens.render, offset: 0x0246edf9, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} />)(importDefault(15182) /* metro dependency 15182: ChatPreview */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115818() { // fn#115818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1209, owner: getChannelSettingsScreens.render, offset: 0x0246ee2b, size: 39 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component />)(importDefault(15183) /* metro dependency 15183: ChannelSettingsInstantInvites */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115819(a0) { // fn#115819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1297, owner: getChannelSettingsScreens.render, offset: 0x0246ee52, size: 65 bytes, params: 2, frame: 15
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...a0} {...{['channelId']: env0_0}} />)(importDefault(15185) /* metro dependency 15185: EasyChannelPermissionSettings */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115820(a0) { // fn#115820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1421, owner: getChannelSettingsScreens.render, offset: 0x0246ee93, size: 60 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15190) /* metro dependency 15190: ChannelSettingsPermissionsList */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115821(a0) { // fn#115821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1533, owner: getChannelSettingsScreens.render, offset: 0x0246eecf, size: 60 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15191) /* metro dependency 15191: ChannelSettingsPermissionsOverrides */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115822(a0) { // fn#115822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1637, owner: getChannelSettingsScreens.render, offset: 0x0246ef0b, size: 60 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15200) /* metro dependency 15200: ChannelSettingsIntegrationsOverview */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115823() { // fn#115823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1737, owner: getChannelSettingsScreens.render, offset: 0x0246ef47, size: 65 bytes, params: 1, frame: 15
|
||||
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
|
||||
const INCOMING = WebhookTypes.INCOMING;
|
||||
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={INCOMING} />;
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115824(a0) { // fn#115824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1863, owner: getChannelSettingsScreens.render, offset: 0x0246ef88, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(15210) /* metro dependency 15210: IntegrationsSettingsEditWebhook */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115825(a0) { // fn#115825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:1960, owner: getChannelSettingsScreens.render, offset: 0x0246efb9, size: 49 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component {...a0} />)(importDefault(15212) /* metro dependency 15212: IntegrationsSettingsEditLinkedLobby */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115826() { // fn#115826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2057, owner: getChannelSettingsScreens.render, offset: 0x0246efea, size: 65 bytes, params: 1, frame: 15
|
||||
const IntegrationsSettingsWebhooksOverview = importDefault(15203) /* metro dependency 15203: IntegrationsSettingsWebhooksOverview */;
|
||||
const CHANNEL_FOLLOWER = WebhookTypes.CHANNEL_FOLLOWER;
|
||||
return <IntegrationsSettingsWebhooksOverview channelId={env0_0} webhookType={CHANNEL_FOLLOWER} />;
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115827() { // fn#115827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2194, owner: getChannelSettingsScreens.render, offset: 0x0246f02b, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} />)(importDefault(15213) /* metro dependency 15213: ChannelSettingsChangeCategory */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115828() { // fn#115828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2302, owner: getChannelSettingsScreens.render, offset: 0x0246f05d, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} />)(importDefault(15214) /* metro dependency 15214: ChannelSettingsChangeRTCRegion */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115829(a0) { // fn#115829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2360, owner: getChannelSettingsScreens.render, offset: 0x0246f08f, size: 60 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} {...a0} />)(importDefault(15215) /* metro dependency 15215: ChannelSettingsEditForumTag */);
|
||||
}
|
||||
|
||||
function getChannelSettingsScreensRender_115830() { // fn#115830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15368:2475, owner: getChannelSettingsScreens.render, offset: 0x0246f0cb, size: 50 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component channelId={env0_0} />)(importDefault(15216) /* metro dependency 15216: ChannelSettingsChangeDefaultForumLayout */);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,485 @@
|
||||
/* Metro module 10935; source: components_native/channel_settings/ChannelSettingsNotifications.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1383, 1379, 4111, 3793, 4864, 1878, 661, 33, 1244, 4501, 697, 6613, 4080, 10936, 1962, 6610, 4863, 4805, 6231, 6238, 10938, 6808, 7988, 7987, 4573, 7972, 4572, 3868, 566, 10939, 10940, 2] */
|
||||
function _fun83826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:6, offset: 0x01f2a05f, size: 623 bytes, params: 8, frame: 23
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const channelRecordModule = require(1383) /* metro dependency 1383: ChannelRecord */;
|
||||
const env0_9 = channelRecordModule.isGuildTextChannelType;
|
||||
const env0_10 = channelRecordModule.CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_16 = constantsModule.AnalyticEvents;
|
||||
const env0_17 = constantsModule.UserNotificationSettings;
|
||||
const env0_18 = constantsModule.ChannelTypes;
|
||||
const env0_19 = constantsModule.SettingsPaneTypes;
|
||||
const env0_20 = constantsModule.MAX_MEMBERS_NOTIFY_ALL_MESSAGES;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_21 = value4.jsx;
|
||||
const env0_22 = value4.Fragment;
|
||||
const env0_23 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
|
||||
object3 = {};
|
||||
const object4 = {flex: 1};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object4.paddingTop = PX_16;
|
||||
object3.screenContainer = object4;
|
||||
const TABLE_ROW_PADDING = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_PADDING;
|
||||
object3.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
|
||||
const env0_24 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object3]);
|
||||
const PureComponent = value.PureComponent;
|
||||
value = _fun83836(PureComponent);
|
||||
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
|
||||
value.contextType = ThemeContext;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsNotifications.tsx');
|
||||
exports.default = ChannelSettingsNotificationsSplit;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_83827() { // fn#83827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:462, offset: 0x01f2a2ce, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_83827_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getDefaultNotificationsSublabel(a0) { // fn#83830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:655, offset: 0x01f2a330, size: 235 bytes, params: 2, frame: 16
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
||||
if (ALL_MESSAGES === a0) {
|
||||
return intl.string(t['n/bTaY']);
|
||||
}
|
||||
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
|
||||
if (ONLY_MENTIONS === a0) {
|
||||
return intl.format(t.L2hmYy, {});
|
||||
}
|
||||
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
|
||||
if (NO_MESSAGES === a0) {
|
||||
return intl.string(t.CtVGyQ);
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelSettingsNotificationsGuard({onClose, channelId}) { // fn#83831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:6202, offset: 0x01f2a41b, size: 288 bytes, params: 2, frame: 22
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const env0_3 = channel?.getGuildId();
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserGuildSettingsStore],
|
||||
_fun83833);
|
||||
const memberCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberCountStore],
|
||||
_fun83834);
|
||||
env0_8.useEffect(function() {
|
||||
if (channel == null) {
|
||||
if (onClose != null) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
}, [channel, onClose]);
|
||||
return channel != null ? ((Component) => <Component onClose={onClose} channel={channel} {...value5} {...{['guildMemberCount']: memberCount}} />)(env0_25) : null;
|
||||
}
|
||||
|
||||
function _fun83836(a0) { // fn#83836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:1171, offset: 0x01f2a6a5, size: 201 bytes, params: 2, frame: 16
|
||||
const closure = ChannelSettingsNotifications;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'componentDidMount', value: function() {
|
||||
var defaultImport = importDefault(dependencyMap[22]);
|
||||
var SETTINGS_PANE_VIEWED = AnalyticEvents.SETTINGS_PANE_VIEWED;
|
||||
defaultImport.trackWithMetadata(SETTINGS_PANE_VIEWED, {settings_type: 'channel',
|
||||
destination_pane: SettingsPaneTypes.CHANNEL_NOTIFICATION_SETTINGS});
|
||||
}}, {key: 'componentDidUpdate', value: function(a0) {
|
||||
if (a0.muted !== this.props.muted) {
|
||||
this.setState({muted: this.props.muted});
|
||||
}
|
||||
if (a0.messageNotifications !== this.props.messageNotifications) {
|
||||
this.setState({messageNotifications: this.props.messageNotifications});
|
||||
}
|
||||
}}, {key: 'renderMuteSection', value: value_83846}, {key: 'renderForumSettings', value: value_83847},
|
||||
{key: 'renderNotificationSettings', value: value_83849}, {key: 'render', value: value_83850}]);
|
||||
}
|
||||
|
||||
function ChannelSettingsNotificationsSplit(a0) { // fn#83853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:7154, offset: 0x01f2b5bc, size: 206 bytes, params: 2, frame: 19
|
||||
var r1;
|
||||
var r0;
|
||||
const env0_0 = a0;
|
||||
var value;
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun83854);
|
||||
const value2 = (require(10939) /* metro dependency 10939: NotificationUtils */).useShouldUseNewNotificationSystem('ChannelSettingsNotificationsNative');
|
||||
const value3 = null;
|
||||
if (value3 == channel) {
|
||||
r0 = value3;
|
||||
} else {
|
||||
if (value2) {
|
||||
if (CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING.has(channel.type)) {
|
||||
value = importDefault(10940) /* metro dependency 10940: NotificationSettingsChannel */;
|
||||
value = ((Component) => <Component channel={channel} {...a0} />)(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = <ChannelSettingsNotificationsGuard {...a0} />;
|
||||
}
|
||||
} else {
|
||||
r1 = <ChannelSettingsNotificationsGuard {...a0} />;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun83833() { // fn#83833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:6404, offset: 0x01f2a555, size: 274 bytes, params: 1, frame: 19
|
||||
const r0 = channel?.parent_id != null ? UserGuildSettingsStore.getChannelMessageNotifications(env0_3,
|
||||
channel.parent_id) : UserNotificationSettings.NULL;
|
||||
const messageNotifications = UserGuildSettingsStore.getMessageNotifications(env0_3);
|
||||
const NULL = UserNotificationSettings.NULL;
|
||||
const r1 = r0 === NULL ? messageNotifications : r0;
|
||||
const object2 = {};
|
||||
const getChannelMessageNotifications = UserGuildSettingsStore.getChannelMessageNotifications;
|
||||
const binding = env0_3;
|
||||
const channelIdBinding = channelId;
|
||||
object2.messageNotifications = Reflect.apply(getChannelMessageNotifications, UserGuildSettingsStore, [binding,
|
||||
channelIdBinding]);
|
||||
object2.muted = UserGuildSettingsStore.isChannelMuted(env0_3, channelIdBinding);
|
||||
object2.muteConfig = UserGuildSettingsStore.getChannelMuteConfig(env0_3, channelIdBinding);
|
||||
object2.guildMuted = UserGuildSettingsStore.isMuted(env0_3);
|
||||
object2.guildMessageNotifications = messageNotifications;
|
||||
object2.newForumThreadsCreated = channel != null && UserGuildSettingsStore.getNewForumThreadsCreated(channel);
|
||||
object2.defaultSetting = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun83834() { // fn#83834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:6857, offset: 0x01f2a667, size: 27 bytes, params: 1, frame: 11
|
||||
return GuildMemberCountStore.getMemberCount(env0_3);
|
||||
}
|
||||
|
||||
function ChannelSettingsNotifications(a0) { // fn#83837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:1183, offset: 0x01f2a76e, size: 210 bytes, params: 2, frame: 22
|
||||
env1_3(this, ChannelSettingsNotifications);
|
||||
const items = [a0];
|
||||
const value3 = env1_6(ChannelSettingsNotifications);
|
||||
const value6 = env1_5(this, _isNativeReflectConstruct_83827() ? global.Reflect.construct(value3, items,
|
||||
env1_6(this).constructor) : value3.apply(this, items));
|
||||
value6.radioGroupRef = env1_8.createRef();
|
||||
value6.updateSetting = updateSetting_83838;
|
||||
value6.handleToggleMuteChannel = handleToggleMuteChannel;
|
||||
value6.handleTypeChange = function(a0) {
|
||||
a0.setState({messageNotifications: a0}, _fun83843);
|
||||
};
|
||||
value6.state = {messageNotifications: a0.messageNotifications, muted: a0.muted};
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_83846() { // fn#83846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:2837, offset: 0x01f2ab7c, size: 470 bytes, params: 1, frame: 33
|
||||
const {channel, muteConfig} = this.props;
|
||||
const muted = this.state.muted;
|
||||
const value = environment.__proto__;
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
const channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
|
||||
const jsxRuntimeEnv1_22Binding = jsxRuntimeEnv1_22;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
object.description = Reflect.apply(string, intl, [t['6yI+JS']]);
|
||||
object.hasIcons = false;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const format = intl.format;
|
||||
return (
|
||||
<>
|
||||
<TableRowGroup {...object}>
|
||||
<TableRow
|
||||
label={muted ? Reflect.apply(format, intl, [t['eC+9rj'],
|
||||
{name: channelName}]) : Reflect.apply(format, intl, [t.byjuJm, {name: channelName}])}
|
||||
onPress={this.handleToggleMuteChannel}
|
||||
arrow={!muted}
|
||||
/>
|
||||
</TableRowGroup>
|
||||
{muted ? ((Component) => <Component muteConfig={muteConfig} type={channel.type === ChannelTypes.GUILD_CATEGORY ? (require(10938) /* metro dependency 10938: MutedUntilText */).MuteSettingType.CATEGORY : (require(10938) /* metro dependency 10938: MutedUntilText */).MuteSettingType.CHANNEL} />)(importDefault(10938) /* metro dependency 10938: MutedUntilText */) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function value_83847() { // fn#83847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:3425, offset: 0x01f2ad52, size: 168 bytes, params: 1, frame: 22
|
||||
const props = this.props;
|
||||
const env0_0 = props.channel;
|
||||
const newForumThreadsCreated = props.newForumThreadsCreated;
|
||||
const guildMuted = props.guildMuted;
|
||||
const muted = this.state.muted;
|
||||
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const Rkgjph = (require(1244) /* metro dependency 1244: indexNative */).t.Rkgjph;
|
||||
return (
|
||||
<TableSwitchRow
|
||||
label={Reflect.apply(string, intl, [Rkgjph])}
|
||||
value={newForumThreadsCreated}
|
||||
disabled={muted || guildMuted}
|
||||
onValueChange={onValueChange_83848}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function value_83849() { // fn#83849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:3730, offset: 0x01f2ae2f, size: 1151 bytes, params: 1, frame: 33
|
||||
var r0;
|
||||
var r18;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var items3;
|
||||
var object3;
|
||||
var format;
|
||||
var L2hmYy;
|
||||
var CtVGyQ;
|
||||
var items2;
|
||||
const {channel, guildMuted, guildMemberCount, defaultSetting} = this.props;
|
||||
const {muted, messageNotifications} = this.state;
|
||||
const parent_id = channel.parent_id;
|
||||
let value = null;
|
||||
const r8 = value != parent_id ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wlrV1c) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1Wn2M4']);
|
||||
const isGuildStageVoice2 = channel.isGuildStageVoice();
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const object4 = {value: messageNotifications};
|
||||
object4.onChange = this.handleTypeChange;
|
||||
object4.groupRef = this.radioGroupRef;
|
||||
object4.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss);
|
||||
object4.hasIcons = false;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
const object5 = {};
|
||||
if (isGuildStageVoice2) {
|
||||
object5.disabled = muted || guildMuted;
|
||||
object5.label = r8;
|
||||
object5.subLabel = getDefaultNotificationsSublabel(defaultSetting);
|
||||
object5.value = UserNotificationSettings.NULL;
|
||||
value = <TableRadioRow {...object5} />;
|
||||
items2 = [value];
|
||||
items2[1] = <TableRadioRow disabled={muted || guildMuted} value={UserNotificationSettings.ONLY_MENTIONS} label={intl.string(t['BENn/6'])} />;
|
||||
items2[2] = <TableRadioRow disabled={muted || guildMuted} value={UserNotificationSettings.NO_MESSAGES} label={intl.string(t.CtVGyQ)} />;
|
||||
value = <TableRadioGroup {...object4}>{items2}</TableRadioGroup>;
|
||||
r0 = value;
|
||||
} else {
|
||||
object5.label = r8;
|
||||
object5.subLabel = getDefaultNotificationsSublabel(defaultSetting);
|
||||
r0 = muted || guildMuted;
|
||||
object5.disabled = r0;
|
||||
object5.value = UserNotificationSettings.NULL;
|
||||
items3 = [<TableRadioRow {...object5} />];
|
||||
var tableRadioRowProps = {label: intl.string(t['n/bTaY'])};
|
||||
r18 = muted || guildMuted;
|
||||
tableRadioRowProps.disabled = r18;
|
||||
r18 = value != guildMemberCount && guildMemberCount >= MAX_MEMBERS_NOTIFY_ALL_MESSAGES ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Dh5p5j) : value;
|
||||
tableRadioRowProps.subLabel = r18;
|
||||
tableRadioRowProps.value = UserNotificationSettings.ALL_MESSAGES;
|
||||
items3[1] = <TableRadioRow {...tableRadioRowProps} />;
|
||||
format = intl.format;
|
||||
L2hmYy = t.L2hmYy;
|
||||
r18 = muted || guildMuted;
|
||||
items3[2] = <TableRadioRow label={Reflect.apply(format, intl, [L2hmYy,
|
||||
{}])} disabled={r18} value={UserNotificationSettings.ONLY_MENTIONS} />;
|
||||
string = intl.string;
|
||||
CtVGyQ = t.CtVGyQ;
|
||||
r18 = muted || guildMuted;
|
||||
items3[3] = <TableRadioRow label={Reflect.apply(string, intl,
|
||||
[CtVGyQ])} disabled={r18} value={UserNotificationSettings.NO_MESSAGES} />;
|
||||
value = <TableRadioGroup {...object4}>{items3}</TableRadioGroup>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_83850() { // fn#83850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:5195, offset: 0x01f2b2ae, size: 648 bytes, params: 1, frame: 29
|
||||
var environment;
|
||||
var r9;
|
||||
var r0;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Form;
|
||||
var Stack;
|
||||
var items2;
|
||||
const value = environment.__proto__;
|
||||
const binding = env1_24;
|
||||
const context = this.context;
|
||||
const value2 = undefined;
|
||||
const value3 = binding(context);
|
||||
const {guildMuted, channel, guildMessageNotifications} = this.props;
|
||||
const r8 = isGuildTextChannelType(channel.type) || channel.isForumLikeChannel();
|
||||
const value4 = null;
|
||||
if (value4 == channel) {
|
||||
r0 = value4;
|
||||
} else {
|
||||
r9 = guildMuted ? <Text variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.O34r15,
|
||||
|
||||
{mutedHook: mutedHook_83851})}</Text> : guildMessageNotifications !== UserNotificationSettings.NO_MESSAGES ? value2 : <Text variant="text-sm/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.nRwUIL,
|
||||
|
||||
{notificationHook: notificationHook_83852})}</Text>;
|
||||
Form = (require(7972) /* metro dependency 7972: native */).Form;
|
||||
var formProps = {style: value3.screenContainer};
|
||||
Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_24,
|
||||
style: value3.stackPadding};
|
||||
items2 = [r8 ? this.renderMuteSection() : value4];
|
||||
items2[1] = this.renderNotificationSettings();
|
||||
items2[2] = channel.isForumLikeChannel() ? ((TableRowGroup) => <TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bK11jO)} hasIcons={false}>{this.renderForumSettings()}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup) : value4;
|
||||
items2[3] = r9;
|
||||
r0 = <Form {...formProps}><Stack {...stackProps}>{items2}</Stack></Form>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun83854() { // fn#83854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:7239, offset: 0x01f2b68a, size: 31 bytes, params: 1, frame: 11
|
||||
return ChannelStore.getChannel(env0_0.channelId);
|
||||
}
|
||||
|
||||
function ChannelSettingsNotificationsUpdateSetting({muted, messageNotifications, mute_config}, a1) { // fn#83838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:1493, owner: ChannelSettingsNotifications.updateSetting, offset: 0x01f2a840, size: 148 bytes, params: 3, frame: 19
|
||||
var r2;
|
||||
const channel = env0_0.props.channel;
|
||||
const object2 = {};
|
||||
let value = false;
|
||||
if (muted === undefined) {
|
||||
r2 = value;
|
||||
} else {
|
||||
object2.muted = muted;
|
||||
value = null;
|
||||
object2.mute_config = value != mute_config ? mute_config : value;
|
||||
value = true;
|
||||
r2 = value;
|
||||
}
|
||||
if (messageNotifications !== undefined) {
|
||||
object2.message_notifications = messageNotifications;
|
||||
r2 = true;
|
||||
}
|
||||
if (r2) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
||||
value.updateChannelOverrideSettings(channel.getGuildId(), channel.id, object2, a1);
|
||||
}
|
||||
}
|
||||
|
||||
function handleToggleMuteChannel() { // fn#83839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:1775, owner: ChannelSettingsNotifications.handleToggleMuteChannel, offset: 0x01f2a8d4, size: 217 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
var defaultImport;
|
||||
var openLazy;
|
||||
var id;
|
||||
var value2;
|
||||
var object2;
|
||||
var value;
|
||||
let binding = env0_0;
|
||||
const muted = binding.state.muted;
|
||||
var env0_0 = muted;
|
||||
const channel = binding.props.channel;
|
||||
if (muted) {
|
||||
binding = env0_0;
|
||||
binding.setState({muted: !muted}, _fun83840);
|
||||
} else {
|
||||
value = environment.__proto__.__proto__;
|
||||
defaultImport = importDefault(dependencyMap[18]);
|
||||
openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[20]);
|
||||
value = value(dependencyMap[19], dependencyMap.paths);
|
||||
id = channel.id;
|
||||
value2 = 'muteSettings' + id;
|
||||
object2 = {};
|
||||
object2.guildId = channel.getGuildId();
|
||||
id = channel.id;
|
||||
object2.channelId = id;
|
||||
object2.onOptionPress = onOptionPress_83841;
|
||||
Reflect.apply(openLazy, defaultImport, [value, value2, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function ChannelSettingsNotificationsHandleTypeChange(a0) { // fn#83842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:2117, owner: ChannelSettingsNotifications.handleTypeChange, offset: 0x01f2aa48, size: 46 bytes, params: 2, frame: 14
|
||||
a0.setState({messageNotifications: a0}, _fun83843);
|
||||
}
|
||||
|
||||
function value_83847OnValueChange() { // fn#83848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:3642, owner: value_83847.onValueChange, offset: 0x01f2adfa, size: 53 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
||||
value.setForumThreadsCreated(channel, !newForumThreadsCreated);
|
||||
}
|
||||
|
||||
function value_83850MutedHook(a0, a1) { // fn#83851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:5481, owner: value_83850.mutedHook, offset: 0x01f2b536, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-feedback-critical"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function value_83850NotificationHook(a0, a1) { // fn#83852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:5729, owner: value_83850.notificationHook, offset: 0x01f2b579, size: 67 bytes, params: 3, frame: 15
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
return (
|
||||
<Text
|
||||
variant="text-sm/medium"
|
||||
color="text-feedback-warning"
|
||||
key={a1}
|
||||
>
|
||||
{a0}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun83840() { // fn#83840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:1843, offset: 0x01f2a9ad, size: 83 bytes, params: 1, frame: 16
|
||||
let value = environment.__proto__;
|
||||
const binding = env1_0;
|
||||
const updateSetting = binding.updateSetting;
|
||||
const object2 = {};
|
||||
value = !muted;
|
||||
object2.muted = value;
|
||||
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
|
||||
return Reflect.apply(updateSetting, binding, [object2, NotificationLabel.muted(value)]);
|
||||
}
|
||||
|
||||
function handleToggleMuteChannelOnOptionPress(a0) { // fn#83841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:2031, owner: ChannelSettingsNotifications.handleToggleMuteChannel.onOptionPress, offset: 0x01f2aa00, size: 72 bytes, params: 2, frame: 15
|
||||
const binding = env1_0;
|
||||
const updateSetting = binding.updateSetting;
|
||||
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
|
||||
return Reflect.apply(updateSetting, binding, [a0, NotificationLabel.muted(a0.muted)]);
|
||||
}
|
||||
|
||||
function _fun83843() { // fn#83843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11121:2158, offset: 0x01f2aa76, size: 77 bytes, params: 1, frame: 16
|
||||
const binding = env1_0;
|
||||
const updateSetting = binding.updateSetting;
|
||||
const object2 = {};
|
||||
const binding2 = env0_0;
|
||||
object2.messageNotifications = binding2;
|
||||
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
|
||||
return Reflect.apply(updateSetting, binding, [object2, NotificationLabel.notifications(binding2)]);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,328 @@
|
||||
/* Metro module 15190; source: components_native/channel_settings/ChannelSettingsPermissionsList.tsx; dependencies: [57, 31, 27, 1379, 1945, 1938, 1878, 661, 33, 4501, 697, 566, 6590, 1484, 1585, 7705, 4603, 3789, 6238, 11025, 1909, 12140, 6984, 1244, 8671, 1305, 8754, 2] */
|
||||
function _fun116140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:6, offset: 0x0247c31d, size: 442 bytes, params: 8, frame: 24
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_6 = (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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_11 = constantsModule.PermissionOverrideType;
|
||||
const env0_12 = constantsModule.ChannelSettingsSections;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value3.jsx;
|
||||
const env0_14 = value3.jsxs;
|
||||
object3 = {rows: [], sections: []};
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {};
|
||||
const object4 = {};
|
||||
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
||||
object4.backgroundColor = BACKGROUND_BASE_LOWER;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object4.paddingHorizontal = PX_12;
|
||||
object4.flex = 1;
|
||||
object3.container = object4;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.containerSearchBar = {paddingVertical: PX_8};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
value = value.memo(ChannelSettingsPermissionsList);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsList.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function ChannelSettingsPermissionsList({channelId, type}) { // fn#116141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:498, offset: 0x0247c4d7, size: 1204 bytes, params: 2, frame: 35
|
||||
var r8;
|
||||
var r5;
|
||||
var EmptyState;
|
||||
var FastestListAndroid;
|
||||
var space;
|
||||
var PX_8;
|
||||
let env0_5 = undefined;
|
||||
const styles = useStyles();
|
||||
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
let binding = env0_5;
|
||||
const [property, property2] = env0_4(binding.useState(''), 2);
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
const {guildId,
|
||||
sortedGuildRoles} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildRoleStore],
|
||||
_fun116143, [channel]);
|
||||
const MEMBER = PermissionOverrideType.MEMBER;
|
||||
const value7 = useGuildMemberData({enabled: type === MEMBER, permissionOverwrites: channel?.permissionOverwrites,
|
||||
guildId: guildId, searchQuery: property});
|
||||
const rows = value7.rows;
|
||||
env0_5 = rows;
|
||||
const sections = value7.sections;
|
||||
let ROLE = PermissionOverrideType.ROLE;
|
||||
const value8 = useGuildRoleData({enabled: type === ROLE, channel: channel, sortedGuildRoles: sortedGuildRoles,
|
||||
searchQuery: property});
|
||||
const rows2 = value8.rows;
|
||||
const sections2 = value8.sections;
|
||||
const {rowHeight,
|
||||
rowContentHeight} = (require(7705) /* metro dependency 7705: useScaledRowHeight */).useScaledRowHeightData();
|
||||
binding = env0_5;
|
||||
const value11 = binding.useCallback(_fun116153, [guildId, rows, rows2, binding.useCallback(_fun116151, [channelId,
|
||||
value3, type]), type, rowContentHeight]);
|
||||
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const view = <View style={styles.containerSearchBar}><SearchField size="md" placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5h0QOP'])} onChange={property2} isRound /></View>;
|
||||
ROLE = PermissionOverrideType.ROLE;
|
||||
if ((type === ROLE ? rows2.length : rows.length) !== 0) {
|
||||
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
|
||||
var defaultImportProps = {sections: type !== PermissionOverrideType.ROLE ? sections : sections2,
|
||||
itemSize: rowHeight, estimatedListSize: 'windowSize', renderItem: value11, wrapChildren: true};
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_8 = space.PX_8;
|
||||
defaultImportProps.insetStart = PX_8;
|
||||
space = (importDefault(697) /* metro dependency 697: native */).space;
|
||||
PX_8 = space.PX_8;
|
||||
defaultImportProps.insetEnd = PX_8 + bottom;
|
||||
defaultImportProps.keyboardShouldPersistTaps = 'always';
|
||||
r5 = <FastestListAndroid {...defaultImportProps} />;
|
||||
} else {
|
||||
EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
|
||||
var emptyStateProps = {Illustration: (require(8754) /* metro dependency 8754: NoResults */).NoResults};
|
||||
ROLE = PermissionOverrideType.ROLE;
|
||||
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Sojqsr) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pYHobK);
|
||||
emptyStateProps.title = r8;
|
||||
ROLE = PermissionOverrideType.ROLE;
|
||||
r8 = type === ROLE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7gBhmO']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tuL9TW);
|
||||
emptyStateProps.body = r8;
|
||||
r5 = <EmptyState {...emptyStateProps} />;
|
||||
}
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
{view}
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116143() { // fn#116143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:755, offset: 0x0247c98b, size: 84 bytes, params: 1, frame: 13
|
||||
var r2;
|
||||
var value;
|
||||
const channelBinding = channel;
|
||||
const value2 = undefined;
|
||||
const r1 = (channelBinding == null ? value2 : channel.getGuildId()) ?? value2;
|
||||
if (r1 != null) {
|
||||
value = environment.__proto__;
|
||||
value = GuildRoleStore.getSortedRoles(r1);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value2;
|
||||
}
|
||||
return {sortedGuildRoles: r2, guildId: r1};
|
||||
}
|
||||
|
||||
function useGuildMemberData({enabled, permissionOverwrites, guildId, searchQuery}) { // fn#116144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:929, owner: ChannelSettingsPermissionsList.useGuildMemberData, offset: 0x0247c9df, size: 146 bytes, params: 2, frame: 19
|
||||
return env1_5.useMemo(_fun116146, [enabled, guildId,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], function() {
|
||||
return GuildMemberStore.getMemberVersion();
|
||||
}), permissionOverwrites, searchQuery]);
|
||||
}
|
||||
|
||||
function useGuildRoleData({enabled, channel, sortedGuildRoles, searchQuery}) { // fn#116148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1590, owner: ChannelSettingsPermissionsList.useGuildRoleData, offset: 0x0247cbd8, size: 90 bytes, params: 2, frame: 17
|
||||
return env1_5.useMemo(_fun116149, [enabled, channel, sortedGuildRoles, searchQuery]);
|
||||
}
|
||||
|
||||
function _fun116151(a0, a1) { // fn#116151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2074, offset: 0x0247cd01, size: 144 bytes, params: 3, frame: 19
|
||||
var environment;
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var updatePermissionOverwrite;
|
||||
var object2;
|
||||
var NONE;
|
||||
const env0_0 = a0;
|
||||
let channelIdBinding = channelId;
|
||||
if (channelIdBinding != null) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
updatePermissionOverwrite = defaultImport.updatePermissionOverwrite;
|
||||
channelIdBinding = channelId;
|
||||
object2 = {id: a0, type: a1};
|
||||
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
|
||||
object2.allow = NONE;
|
||||
NONE = (importAll(3789) /* metro dependency 3789: PermissionUtils */).NONE;
|
||||
object2.deny = NONE;
|
||||
Reflect.apply(updatePermissionOverwrite, defaultImport, [channelIdBinding, object2]).then(_fun116152);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun116153(a0, a1) { // fn#116153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2285, offset: 0x0247cdd0, size: 354 bytes, params: 3, frame: 22
|
||||
var property;
|
||||
const value = a1 === 0;
|
||||
let typeBinding = type;
|
||||
const ROLE = PermissionOverrideType.ROLE;
|
||||
const value4 = a1 === (typeBinding === ROLE ? rows.length : rows.length) - 1;
|
||||
if (guildId != null) {
|
||||
typeBinding = type;
|
||||
if (PermissionOverrideType.ROLE === typeBinding) {
|
||||
property = rows[a1];
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
return (
|
||||
<TableRow
|
||||
arrow
|
||||
end={value4}
|
||||
label={((RoleLabel) => <RoleLabel name={property.name} color={property.colorString} colors={property.colorStrings} />)((require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel)}
|
||||
onPress={onPress_116154}
|
||||
start={value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
var MEMBER = PermissionOverrideType.MEMBER;
|
||||
if (MEMBER === typeBinding) {
|
||||
return ((Component) => <Component arrow contentHeight={rowContentHeight} end={value4} guildId={guildId} userId={rows[a1].id} onPress={onPress_116155} start={value} />)(importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun116146() { // fn#116146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1101, offset: 0x0247ca86, size: 287 bytes, params: 1, frame: 28
|
||||
var environment;
|
||||
var r7;
|
||||
var r14;
|
||||
var r12;
|
||||
var items2;
|
||||
var value2;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var user;
|
||||
var value6;
|
||||
var property2;
|
||||
var value7;
|
||||
var length;
|
||||
var value8;
|
||||
var defaultImport;
|
||||
var toLowerCase;
|
||||
var value9;
|
||||
var username;
|
||||
var value10;
|
||||
var value;
|
||||
if (enabled) {
|
||||
if (guildId == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
return env2_15;
|
||||
}
|
||||
items2 = [];
|
||||
value2 = environment.__proto__.__proto__;
|
||||
for (propertyName in GuildMemberStore.getMutableAllGuildsAndMembers()[guildId]) {
|
||||
user = UserStore.getUser(propertyName);
|
||||
value6 = user != null;
|
||||
if (!value6) {
|
||||
r12 = value6;
|
||||
continue;
|
||||
}
|
||||
if (permissionOverwrites == null) {
|
||||
r14 = undefined;
|
||||
continue;
|
||||
}
|
||||
property2 = permissionOverwrites[propertyName];
|
||||
r14 = property2;
|
||||
value7 = r14 == null;
|
||||
r12 = value7;
|
||||
if (!r12) {
|
||||
continue;
|
||||
}
|
||||
length = searchQuery.length;
|
||||
value8 = length === 0;
|
||||
if (value8) {
|
||||
r14 = value8;
|
||||
continue;
|
||||
}
|
||||
defaultImport = importDefault(6590) /* metro dependency 6590 */;
|
||||
value9 = searchQuery.toLowerCase();
|
||||
username = user.username;
|
||||
toLowerCase = username.toLowerCase;
|
||||
value10 = defaultImport(value9, Reflect.apply(toLowerCase, username, []));
|
||||
r14 = value10;
|
||||
r12 = r14;
|
||||
if (!r12) {
|
||||
r7 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
items2.push(user);
|
||||
r7 = propertyName2;
|
||||
}
|
||||
items2.sort(function(a0, a1) {
|
||||
var username = a0.username;
|
||||
var value = username.toLowerCase();
|
||||
username = a1.username;
|
||||
return value.localeCompare(username.toLowerCase());
|
||||
});
|
||||
length = items2.length;
|
||||
return {rows: items2, sections: [length]};
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
return env2_15;
|
||||
}
|
||||
|
||||
function _fun116149() { // fn#116149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1690, offset: 0x0247cc32, size: 87 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
var value;
|
||||
if (enabled) {
|
||||
if (sortedGuildRoles == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
return env2_15;
|
||||
}
|
||||
if (channel == null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
return env2_15;
|
||||
}
|
||||
value = sortedGuildRoles.filter(_fun116150);
|
||||
return {rows: value, sections: [value.length]};
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
return env2_15;
|
||||
}
|
||||
|
||||
function _fun116152() { // fn#116152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2190, offset: 0x0247cd91, size: 63 bytes, params: 1, frame: 14
|
||||
const binding = env1_2;
|
||||
const push = binding.push;
|
||||
const PERMISSION_OVERRIDES = ChannelSettingsSections.PERMISSION_OVERRIDES;
|
||||
Reflect.apply(push, binding, [PERMISSION_OVERRIDES, {type: type, id: env0_0, fromCreate: true}]);
|
||||
}
|
||||
|
||||
function onPress_116154() { // fn#116154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2535, offset: 0x0247cf32, size: 64 bytes, params: 1, frame: 14
|
||||
const binding = env1_8;
|
||||
const id = env0_0.id;
|
||||
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
|
||||
const ROLE = PermissionOverwriteType.ROLE;
|
||||
binding(id, ROLE);
|
||||
}
|
||||
|
||||
function onPress_116155() { // fn#116155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:2702, offset: 0x0247cf72, size: 59 bytes, params: 1, frame: 14
|
||||
const binding = env1_8;
|
||||
const idBinding = id;
|
||||
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
|
||||
const MEMBER = PermissionOverwriteType.MEMBER;
|
||||
binding(idBinding, MEMBER);
|
||||
}
|
||||
|
||||
function _fun116150(a0) { // fn#116150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15387:1744, offset: 0x0247cc89, size: 120 bytes, params: 2, frame: 17
|
||||
var r3;
|
||||
var value3;
|
||||
var defaultImport;
|
||||
var value4;
|
||||
var name;
|
||||
const value = environment.__proto__;
|
||||
const value2 = searchQuery.length !== 0;
|
||||
if (value2) {
|
||||
value3 = environment.__proto__.__proto__.__proto__;
|
||||
defaultImport = importDefault(6590) /* metro dependency 6590 */;
|
||||
value4 = searchQuery.toLowerCase();
|
||||
name = a0.name;
|
||||
r3 = !defaultImport(value4, name.toLowerCase());
|
||||
} else {
|
||||
r3 = value2;
|
||||
}
|
||||
return !r3 && channel.permissionOverwrites[a0.id] == null;
|
||||
}
|
||||
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
/* Metro module 15197; source: components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx; dependencies: [31, 27, 33, 697, 4501, 3789, 1244, 10625, 9294, 15198, 3874, 2] */
|
||||
function _fun116230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:6, offset: 0x02481d66, size: 748 bytes, params: 8, frame: 26
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value2.Pressable;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
const md = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object = {};
|
||||
const object3 = {};
|
||||
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
||||
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
|
||||
object3.borderRadius = md;
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object3.height = PX_32;
|
||||
object3.paddingVertical = PX_4;
|
||||
object3.paddingHorizontal = PX_4 / 2;
|
||||
object3.flexDirection = 'row';
|
||||
object.ternaryCheckBox = object3;
|
||||
object.iconWrapper = {borderRadius: md - PX_4, marginHorizontal: PX_4 / 2, justifyContent: 'center', height: '100%'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object.icon = {marginHorizontal: PX_8};
|
||||
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
|
||||
object.denyActive = {backgroundColor: BACKGROUND_FEEDBACK_CRITICAL};
|
||||
const object4 = {};
|
||||
const ICON_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL;
|
||||
object4.backgroundColor = ICON_FEEDBACK_CRITICAL;
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm - 2;
|
||||
object.denySelected = object4;
|
||||
const BACKGROUND_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_POSITIVE;
|
||||
object.allowActive = {backgroundColor: BACKGROUND_FEEDBACK_POSITIVE};
|
||||
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
|
||||
object.allowSelected = {backgroundColor: ICON_FEEDBACK_POSITIVE};
|
||||
const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED;
|
||||
object.passthroughSelected = {backgroundColor: INTERACTIVE_BACKGROUND_SELECTED};
|
||||
const INTERACTIVE_BACKGROUND_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_HOVER;
|
||||
object.passthroughActive = {backgroundColor: INTERACTIVE_BACKGROUND_HOVER};
|
||||
object.disabled = {opacity: 0.3};
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule, [object]);
|
||||
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
|
||||
object = [DENY];
|
||||
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
|
||||
object[1] = PASSTHROUGH;
|
||||
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
|
||||
object[2] = ALLOW;
|
||||
value = value.memo(ChannelSettingsPermissionsOverrideCheckbox);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverrideCheckbox.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function getAccessibilityLabel(a0) { // fn#116231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1095, offset: 0x02482052, size: 274 bytes, params: 2, frame: 15
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
|
||||
if (DENY === a0) {
|
||||
return intl.string(t['6639O5']);
|
||||
}
|
||||
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
|
||||
if (ALLOW === a0) {
|
||||
return intl.string(t.RzDfSk);
|
||||
}
|
||||
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
|
||||
if (PASSTHROUGH === a0) {
|
||||
return intl.string(t.ujC3ZS);
|
||||
}
|
||||
}
|
||||
|
||||
function getIcon_116232(a0, a1, a2) { // fn#116232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1355, offset: 0x02482164, size: 417 bytes, params: 4, frame: 19
|
||||
var SlashIcon;
|
||||
var colors;
|
||||
var CheckmarkLargeBoldIcon;
|
||||
var DenyIcon;
|
||||
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
|
||||
if (DENY === a0) {
|
||||
DenyIcon = (require(10625) /* metro dependency 10625: DenyIcon */).DenyIcon;
|
||||
var denyIconProps = {size: 'sm', style: a2.icon};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
denyIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_CRITICAL;
|
||||
return <DenyIcon {...denyIconProps} />;
|
||||
}
|
||||
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
|
||||
if (ALLOW === a0) {
|
||||
CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
|
||||
var checkmarkLargeBoldIconProps = {size: 'sm', style: a2.icon};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
checkmarkLargeBoldIconProps.color = a1 ? colors.WHITE : colors.ICON_FEEDBACK_POSITIVE;
|
||||
return <CheckmarkLargeBoldIcon {...checkmarkLargeBoldIconProps} />;
|
||||
}
|
||||
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
|
||||
if (PASSTHROUGH === a0) {
|
||||
SlashIcon = (require(15198) /* metro dependency 15198: SlashIcon */).SlashIcon;
|
||||
var slashIconProps = {size: 'sm', style: a2.icon};
|
||||
colors = (importDefault(697) /* metro dependency 697: native */).colors;
|
||||
slashIconProps.color = a1 ? colors.WHITE : colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
return <SlashIcon {...slashIconProps} />;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function getPressableStyleOverrides(a0, a1, a2) { // fn#116233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:1852, offset: 0x02482305, size: 157 bytes, params: 4, frame: 16
|
||||
const DENY = (require(3789) /* metro dependency 3789: PermissionUtils */).DENY;
|
||||
if (DENY === a0) {
|
||||
return a1 ? a2.denySelected : a2.denyActive;
|
||||
}
|
||||
const ALLOW = (require(3789) /* metro dependency 3789: PermissionUtils */).ALLOW;
|
||||
if (ALLOW === a0) {
|
||||
return a1 ? a2.allowSelected : a2.allowActive;
|
||||
}
|
||||
const PASSTHROUGH = (require(3789) /* metro dependency 3789: PermissionUtils */).PASSTHROUGH;
|
||||
if (PASSTHROUGH === a0) {
|
||||
return a1 ? a2.passthroughSelected : a2.passthroughActive;
|
||||
}
|
||||
}
|
||||
|
||||
function OverrideOption({type, selected, styles, onPress}) { // fn#116234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2110, offset: 0x024823a2, size: 163 bytes, params: 2, frame: 22
|
||||
const {accessibilityRole,
|
||||
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected});
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityRole={accessibilityRole}
|
||||
accessibilityLabel={getAccessibilityLabel(type)}
|
||||
accessibilityState={accessibilityState}
|
||||
style={style_116235}
|
||||
onPress={onPress}
|
||||
>
|
||||
{getIcon_116232(type, selected, styles)}
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function ChannelSettingsPermissionsOverrideCheckbox({value, disabled, onValueChange}) { // fn#116236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2504, offset: 0x0248249a, size: 158 bytes, params: 2, frame: 20
|
||||
disabled = !(disabled === undefined) && disabled;
|
||||
const styles = useStyles();
|
||||
return (
|
||||
<View
|
||||
style={[styles.ternaryCheckBox, disabled && styles.disabled]}
|
||||
pointerEvents={disabled ? 'none' : 'auto'}
|
||||
accessibilityRole="radiogroup"
|
||||
>
|
||||
{env0_7.map(_fun116237)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function OverrideOptionStyle({pressed}) { // fn#116235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2370, owner: OverrideOption.style, offset: 0x02482445, size: 85 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var stylesBinding;
|
||||
var value2;
|
||||
var getPressableStyleOverridesBinding;
|
||||
var typeBinding;
|
||||
var items2;
|
||||
let selectedBinding = selected;
|
||||
if (selectedBinding) {
|
||||
value2 = environment.__proto__;
|
||||
getPressableStyleOverridesBinding = getPressableStyleOverrides;
|
||||
typeBinding = type;
|
||||
selectedBinding = selected;
|
||||
stylesBinding = styles;
|
||||
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
|
||||
items2[1] = stylesBinding.iconWrapper;
|
||||
r0 = items2;
|
||||
} else if (pressed) {
|
||||
value2 = environment.__proto__;
|
||||
getPressableStyleOverridesBinding = getPressableStyleOverrides;
|
||||
typeBinding = type;
|
||||
selectedBinding = selected;
|
||||
stylesBinding = styles;
|
||||
items2 = [getPressableStyleOverridesBinding(typeBinding, selectedBinding, stylesBinding)];
|
||||
items2[1] = stylesBinding.iconWrapper;
|
||||
r0 = items2;
|
||||
} else {
|
||||
r0 = styles.iconWrapper;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116237(a0, a1) { // fn#116237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2736, offset: 0x02482538, size: 100 bytes, params: 3, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (
|
||||
<OverrideOption
|
||||
type={a0}
|
||||
selected={value === a0}
|
||||
styles={styles}
|
||||
onPress={onPress_116238}
|
||||
key={'checkbox-' + a1}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_116238() { // fn#116238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15394:2800, offset: 0x0248259c, size: 56 bytes, params: 1, frame: 12
|
||||
if (onValueChange != null && value !== env0_0) {
|
||||
onValueChange(env0_0);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,439 @@
|
||||
/* Metro module 15189; source: components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx; dependencies: [57, 5, 31, 27, 1939, 1379, 1938, 1867, 3793, 1878, 661, 33, 4501, 697, 4647, 1244, 4805, 3789, 9090, 8148, 22, 6231, 6238, 13127, 1484, 10375, 11025, 13770, 566, 1909, 12140, 1360, 5465, 9603, 4603, 2] */
|
||||
function _fun116097(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6, offset: 0x0247adba, size: 512 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 */;
|
||||
const env0_7 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_8 = (require(1939) /* metro dependency 1939: GuildRoleRecord */).isEveryoneRole;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_14 = value.PermissionOverrideType;
|
||||
const env0_15 = value.ChannelSettingsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_16 = value.jsx;
|
||||
const env0_17 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.tableRowGroupContainer = {marginBottom: PX_16};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object2.tableContainer = {marginHorizontal: PX_12};
|
||||
const env0_18 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsPermissionsOverview.tsx');
|
||||
exports.default = ChannelSettingsPermissionsOverview;
|
||||
}
|
||||
|
||||
function ChannelPermissionSyncModule({channel, category, locked}) { // fn#116098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:451, offset: 0x0247afba, size: 411 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const value2 = env0_6.useCallback(_fun116099, [channel, category]);
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
const channelName = useChannelNameModule.computeChannelName(category, UserStore, RelationshipStore);
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const r7 = locked ? Reflect.apply(formatToPlainString, intl, [t.ETJqLl,
|
||||
{categoryName: channelName}]) : Reflect.apply(formatToPlainString, intl, [t.OIhm0M,
|
||||
{categoryName: channelName}]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object = {};
|
||||
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
|
||||
object.icon = <RefreshIcon />;
|
||||
const string = intl.string;
|
||||
const NVwuHq = (require(1244) /* metro dependency 1244: indexNative */).t.NVwuHq;
|
||||
object.label = Reflect.apply(string, intl, [NVwuHq]);
|
||||
object.onPress = value2;
|
||||
return (
|
||||
<View style={styles.tableRowGroupContainer}>
|
||||
<TableRowGroup title={r7} hasIcons>
|
||||
<TableRow {...object} />
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function CategorySync({channel, category, isEditing, locked}) { // fn#116103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1636, offset: 0x0247b3cb, size: 77 bytes, params: 2, frame: 16
|
||||
const value = null;
|
||||
return value == category || isEditing ? value : <ChannelPermissionSyncModule channel={channel} category={category} locked={locked} />;
|
||||
}
|
||||
|
||||
function AddPermission({isEditing}) { // fn#116104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1789, offset: 0x0247b418, size: 471 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
if (isEditing) {
|
||||
return null;
|
||||
}
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const object = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vPHdP5);
|
||||
object.hasIcons = true;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const PlusMediumIcon = (require(10375) /* metro dependency 10375: PlusMediumIcon */).PlusMediumIcon;
|
||||
const tableRow = <TableRow icon={<PlusMediumIcon />} label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fVWxvT)} onPress={function() {
|
||||
handleCreatePermissionOverwrite(PermissionOverrideType.ROLE);
|
||||
}} />;
|
||||
return (
|
||||
<View style={styles.tableRowGroupContainer}>
|
||||
<TableRowGroup {...object}>
|
||||
{tableRow}
|
||||
<TableRow
|
||||
icon={<PlusMediumIcon />}
|
||||
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.riesLt)}
|
||||
onPress={function() {
|
||||
handleCreatePermissionOverwrite(PermissionOverrideType.MEMBER);
|
||||
}}
|
||||
/>
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function RoleRow_116108({role, isEditing, onSelect, onDelete}) { // fn#116108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2424, offset: 0x0247b655, size: 308 bytes, params: 2, frame: 26
|
||||
var r4;
|
||||
var CircleMinusIcon;
|
||||
var intl;
|
||||
const name = role.name;
|
||||
const colorString = role.colorString;
|
||||
const colorStrings = role.colorStrings;
|
||||
const isEveryoneRole2 = isEveryoneRole(role);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {};
|
||||
const RoleLabel = (require(11025) /* metro dependency 11025: RoleLabel */).RoleLabel;
|
||||
object2.label = <RoleLabel name={name} color={colorString} colors={colorStrings} />;
|
||||
object2.arrow = !isEditing;
|
||||
if (isEditing) {
|
||||
if (isEveryoneRole2) {
|
||||
r4 = null;
|
||||
} else {
|
||||
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
|
||||
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
|
||||
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
|
||||
}
|
||||
} else {
|
||||
r4 = null;
|
||||
}
|
||||
object2.icon = r4;
|
||||
object2.onPress = isEditing ? isEveryoneRole2 ? onSelect : onDelete : onSelect;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function RoleOverwrites({guild, channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:2799, offset: 0x0247b789, size: 357 bytes, params: 2, frame: 23
|
||||
var object2;
|
||||
var moduleValue2;
|
||||
const styles = useStyles();
|
||||
const sortedRoles = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore],
|
||||
function() {
|
||||
return GuildRoleStore.getSortedRoles(guild.id);
|
||||
});
|
||||
object2 = {};
|
||||
copyDataProperties(object2, channel.permissionOverwrites, undefined);
|
||||
let id = guild.id;
|
||||
if (object2[id] == null) {
|
||||
id = guild.id;
|
||||
moduleValue2 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
object2[id] = moduleValue2.makeEveryoneOverwrite(guild.id);
|
||||
}
|
||||
const value2 = sortedRoles.filter(_fun116111);
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
return (
|
||||
<View style={styles.tableRowGroupContainer}>
|
||||
<TableRowGroup
|
||||
title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['LPJmL/'])}
|
||||
hasIcons
|
||||
>
|
||||
{value2.map(_fun116112)}
|
||||
</TableRowGroup>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function MemberRow({guildId, user, isEditing, onSelect, onDelete}) { // fn#116115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3402, offset: 0x0247b9c7, size: 231 bytes, params: 2, frame: 22
|
||||
var CircleMinusIcon;
|
||||
var intl;
|
||||
const DetailedGuildIdentityUserRow = importDefault(12140) /* metro dependency 12140: DetailedGuildIdentityUserRow */;
|
||||
const defaultImportProps = {userId: user.id, guildId: guildId};
|
||||
let r4 = isEditing ? onDelete : onSelect;
|
||||
defaultImportProps.onPress = r4;
|
||||
defaultImportProps.arrow = !isEditing;
|
||||
if (isEditing) {
|
||||
CircleMinusIcon = (require(13770) /* metro dependency 13770: CircleMinusIcon */).CircleMinusIcon;
|
||||
var circleMinusIconProps = {color: (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
circleMinusIconProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.N86XcP);
|
||||
r4 = <CircleMinusIcon {...circleMinusIconProps} />;
|
||||
} else {
|
||||
r4 = null;
|
||||
}
|
||||
defaultImportProps.leading = r4;
|
||||
return <DetailedGuildIdentityUserRow {...defaultImportProps} />;
|
||||
}
|
||||
|
||||
function MemberOverwrites({channel, isEditing, onSelectRow, onDeleteRow}) { // fn#116116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3690, offset: 0x0247baae, size: 354 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
var TableRowGroup;
|
||||
var intl;
|
||||
const env0_0 = channel.guild_id;
|
||||
const permissionOverwrites = channel.permissionOverwrites;
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(22) /* metro dependency 22 */)(permissionOverwrites);
|
||||
const value4 = value2.filter(function({type}) {
|
||||
return type === require(dependencyMap[29]).PermissionOverwriteType.MEMBER;
|
||||
}).map(function(a0) {
|
||||
return UserStore.getUser(a0.id);
|
||||
});
|
||||
const value8 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).sortBy(function({username}) {
|
||||
return username.toLowerCase();
|
||||
}).value();
|
||||
if (value8.length <= 0) {
|
||||
r0 = null;
|
||||
} else {
|
||||
var viewBindingProps = {style: styles.tableRowGroupContainer};
|
||||
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
r0 = <View {...viewBindingProps}><TableRowGroup title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['9Oq93m'])} hasIcons>{value8.map(_fun116120)}</TableRowGroup></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChannelSettingsPermissionsOverview({channelId}) { // fn#116123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4381, offset: 0x0247bcb5, size: 663 bytes, params: 2, frame: 26
|
||||
let env0_6 = undefined;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
}, [channelId]);
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun116128);
|
||||
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun116129);
|
||||
const env0_4 = guild;
|
||||
const env0_5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildRoleStore], _fun116130);
|
||||
const value4 = env0_6.useMemo(_fun116131, [value3, channel]);
|
||||
const value6 = env0_4(env0_6.useState(false), 2);
|
||||
const property = value6[0];
|
||||
env0_6 = property;
|
||||
const env0_7 = value6[1];
|
||||
env0_6.useLayoutEffect(_fun116134, [value2, property, env0_6.useCallback(_fun116132, [])]);
|
||||
return value3 == null || guild == null ? null : <View style={styles.tableContainer}><CategorySync channel={value3} category={channel} isEditing={property} locked={value4} /><AddPermission isEditing={property} /><RoleOverwrites guild={guild} channel={value3} isEditing={property} onSelectRow={function(a0) {
|
||||
handlePressRow(PermissionOverrideType.ROLE, a0);
|
||||
}} onDeleteRow={function(a0) {
|
||||
handleClearPermissionOverwrite(a0);
|
||||
}} /><MemberOverwrites channel={value3} isEditing={property} onSelectRow={onSelectRow_116138} onDeleteRow={onDeleteRow_116139} /></View>;
|
||||
}
|
||||
|
||||
function _fun116099() { // fn#116099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:548, offset: 0x0247b155, size: 364 bytes, params: 1, frame: 32
|
||||
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
const show = defaultImport.show;
|
||||
const object3 = {};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const YWMtRe = t.YWMtRe;
|
||||
object3.title = Reflect.apply(string, intl, [YWMtRe]);
|
||||
const format = intl.format;
|
||||
const property = t['iKW+jY'];
|
||||
const object4 = {};
|
||||
const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */;
|
||||
object4.channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
|
||||
const moduleValue2 = useChannelNameModule;
|
||||
object4.categoryName = moduleValue2.computeChannelName(category, UserStore, RelationshipStore);
|
||||
object3.body = Reflect.apply(format, intl, [property, object4]);
|
||||
object3.confirmText = intl.string(t.eW8Gy4);
|
||||
object3.cancelText = intl.string(t.s4uM3b);
|
||||
const env0_0 = env1_5(_fun116101);
|
||||
object3.onConfirm = onConfirm_116102;
|
||||
Reflect.apply(show, defaultImport, [object3]);
|
||||
}
|
||||
|
||||
function handleCreatePermissionOverwrite(a0) { // fn#116105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:1881, owner: AddPermission.handleCreatePermissionOverwrite, offset: 0x0247b5ef, size: 44 bytes, params: 2, frame: 14
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
const NEW_PERMISSION = ChannelSettingsSections.NEW_PERMISSION;
|
||||
Reflect.apply(push, binding, [NEW_PERMISSION, {type: a0}]);
|
||||
}
|
||||
|
||||
function _fun116111({id}) { // fn#116111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3066, offset: 0x0247b90e, size: 78 bytes, params: 2, frame: 13
|
||||
const type = env0_4[id]?.type;
|
||||
const PermissionOverwriteType = (require(1909) /* metro dependency 1909: Server */).PermissionOverwriteType;
|
||||
const ROLE = PermissionOverwriteType.ROLE;
|
||||
return type === ROLE;
|
||||
}
|
||||
|
||||
function _fun116112(a0) { // fn#116112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3314, offset: 0x0247b95c, size: 79 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
return (
|
||||
<RoleRow_116108
|
||||
role={a0}
|
||||
isEditing={isEditing}
|
||||
onSelect={onSelect_116113}
|
||||
onDelete={onDelete_116114}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun116120(a0) { // fn#116120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4163, offset: 0x0247bc5f, size: 86 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return (
|
||||
<MemberRow
|
||||
guildId={guild_id}
|
||||
user={a0}
|
||||
isEditing={isEditing}
|
||||
onSelect={onSelect_116121}
|
||||
onDelete={onDelete_116122}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function handlePressRow(a0, a1) { // fn#116124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4962, owner: ChannelSettingsPermissionsOverview.handlePressRow, offset: 0x0247bf4c, size: 58 bytes, params: 3, frame: 14
|
||||
var binding;
|
||||
var push;
|
||||
if (!env0_6) {
|
||||
binding = env0_1;
|
||||
push = binding.push;
|
||||
value = environment.__proto__;
|
||||
Reflect.apply(push, binding, [ChannelSettingsSections.PERMISSION_OVERRIDES, {type: a0, id: a1}]);
|
||||
}
|
||||
}
|
||||
|
||||
function handleClearPermissionOverwrite(a0) { // fn#116125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5039, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite, offset: 0x0247bf86, size: 345 bytes, params: 2, frame: 23
|
||||
const env0_0 = a0;
|
||||
const value2 = undefined;
|
||||
const r1 = env0_5 == null ? value2 : env0_5[a0];
|
||||
const user = UserStore.getUser(a0);
|
||||
const r12 = r1 != null ? r1.name : user == null ? value2 : user.username;
|
||||
const defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
|
||||
const show = defaultImport.show;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
Reflect.apply(show, defaultImport, [{title: Reflect.apply(formatToPlainString, intl, [t.txPV7k, {name: r12}]),
|
||||
body: intl.format(t.xERCnZ, {name: r12}), cancelText: intl.string(t.gm1Vej), confirmText: intl.string(t.p89ACt),
|
||||
onConfirm: onConfirm_116126}]);
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun116128() { // fn#116128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4573, offset: 0x0247c114, size: 47 bytes, params: 1, frame: 13
|
||||
return ChannelStore.getChannel(env0_2?.parent_id);
|
||||
}
|
||||
|
||||
function _fun116129() { // fn#116129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4655, offset: 0x0247c143, size: 47 bytes, params: 1, frame: 13
|
||||
return GuildStore.getGuild(env0_2?.guild_id);
|
||||
}
|
||||
|
||||
function _fun116130() { // fn#116130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4734, offset: 0x0247c172, size: 47 bytes, params: 1, frame: 12
|
||||
return guild != null ? GuildRoleStore.getRolesSnapshot(guild.id) : undefined;
|
||||
}
|
||||
|
||||
function _fun116131() { // fn#116131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4793, offset: 0x0247c1a1, size: 63 bytes, params: 1, frame: 14
|
||||
var r0;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
const value2 = env0_2 != null;
|
||||
if (value2) {
|
||||
value3 = environment.__proto__;
|
||||
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
|
||||
r0 = moduleValue.areChannelsLocked(env0_2, channel);
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun116132() { // fn#116132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:4903, offset: 0x0247c1e0, size: 58 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
env0_7(function(a0) {
|
||||
return !a0;
|
||||
});
|
||||
const value = environment.__proto__;
|
||||
(require(5465) /* metro dependency 5465: DeprecatedLayoutAnimation */).DeprecatedLayoutAnimation();
|
||||
}
|
||||
|
||||
function _fun116134() { // fn#116134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5541, offset: 0x0247c21a, size: 38 bytes, params: 1, frame: 12
|
||||
const binding = env0_1;
|
||||
binding.setOptions({headerRight: headerRight_116135});
|
||||
}
|
||||
|
||||
function ChannelSettingsPermissionsOverviewOnSelectRow_116138(a0) { // fn#116138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:6066, owner: ChannelSettingsPermissionsOverview.onSelectRow, offset: 0x0247c2fc, size: 33 bytes, params: 2, frame: 13
|
||||
const handlePressRowBinding = handlePressRow;
|
||||
const MEMBER = PermissionOverrideType.MEMBER;
|
||||
handlePressRowBinding(MEMBER, a0);
|
||||
}
|
||||
|
||||
function* _fun116101() { // fn#116101, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:887, offset: 0x0247b2cc, size: 255 bytes, params: 1, frame: 21
|
||||
var value5;
|
||||
var binding;
|
||||
var value6;
|
||||
var binding2;
|
||||
var value11;
|
||||
var saveChannel;
|
||||
var id;
|
||||
var object3;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var guild_id = importDefault.guild_id;
|
||||
var object4 = {};
|
||||
copyDataProperties(object4, importDefault.permissionOverwrites, undefined);
|
||||
if (guild_id != null && object4[guild_id] == null) {
|
||||
value5 = environment.__proto__.__proto__.__proto__;
|
||||
value6 = env3_2(env3_3[17]);
|
||||
object4[guild_id] = value6.makeEveryoneOverwrite(guild_id);
|
||||
}
|
||||
var value8 = env3_0(env3_3[18]);
|
||||
yield value8.checkChattableChannelThresholdMetAfterChannelPermissionDeny(require, object4[guild_id].deny,
|
||||
object4[guild_id].allow);
|
||||
var value9 = undefined;
|
||||
if (false) {
|
||||
return value9;
|
||||
}
|
||||
if (value9) {
|
||||
binding = env3_0;
|
||||
binding2 = env3_3;
|
||||
value11 = binding(binding2[19]);
|
||||
saveChannel = value11.saveChannel;
|
||||
id = require.id;
|
||||
object3 = {};
|
||||
binding = env3_1;
|
||||
object3.permissionOverwrites = binding(binding2[20]).values(object4);
|
||||
Reflect.apply(saveChannel, value11, [id, object3]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onSelect_116113() { // fn#116113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:3356, offset: 0x0247b9ab, size: 28 bytes, params: 1, frame: 11
|
||||
return onSelectRow(env0_0.id);
|
||||
}
|
||||
|
||||
function handleClearPermissionOverwriteOnConfirm() { // fn#116126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5416, owner: ChannelSettingsPermissionsOverview.handleClearPermissionOverwrite.onConfirm, offset: 0x0247c0df, size: 53 bytes, params: 1, frame: 14
|
||||
const binding = env0_0;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
||||
value.clearPermissionOverwrite(channelId, binding);
|
||||
}
|
||||
|
||||
function headerRight_116135(a0) { // fn#116135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15386:5572, offset: 0x0247c240, size: 155 bytes, params: 2, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
const HeaderTextButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderTextButton;
|
||||
const headerTextButtonProps = {...a0};
|
||||
headerTextButtonProps['onPress'] = env1_8;
|
||||
const binding = env1_6;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
headerTextButtonProps['label'] = binding ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl,
|
||||
[t.bt75uw]);
|
||||
return <HeaderTextButton {...headerTextButtonProps} />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/* Metro module 15177; source: components_native/channel_settings/ChannelSettingsUtils.tsx; dependencies: [2] */
|
||||
function _fun115952(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15374:6, offset: 0x02475ab4, size: 87 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/channel_settings/ChannelSettingsUtils.tsx');
|
||||
exports.getIsChannelNameSettingEditable = function({canManageThread, canManageChannels, canSendMessages,
|
||||
isForumPost, isThread, isChannelOwner}) {
|
||||
return isForumPost && isChannelOwner ? canSendMessages : isForumPost ? canManageThread : isThread ? canManageThread || isChannelOwner : canManageChannels;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user