559 lines
32 KiB
TypeScript
559 lines
32 KiB
TypeScript
/* 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] */
|
|
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import RelationshipStore from '../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import GuildMemberCountStore from '../../stores/GuildMemberCountStore.tsx'; /* Metro dependency 4111 */
|
|
import UserGuildSettingsStore from '../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
|
|
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as UseChannelNameModule from '../../modules/channel/useChannelName.tsx'; /* Metro dependency 4805 */
|
|
import * as TableRowGroupNativeModule from '../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
|
|
import * as TableRowNativeModule from '../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
|
|
import * as NotificationSettingsUtilsModule from '../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
|
|
import * as TableSwitchRowNativeModule from '../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
|
|
import * as TableRadioRowNativeModule from '../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
|
|
import * as TableRadioGroupNativeModule from '../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
|
|
import * as NotificationUtilsModule from '../../modules/notifications/NotificationUtils.tsx'; /* Metro dependency 10939 */
|
|
|
|
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
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
|
|
object = {};
|
|
const object2 = {flex: 1};
|
|
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
|
|
object2.backgroundColor = BACKGROUND_BASE_LOWER;
|
|
const PX_16 = (Native).space.PX_16;
|
|
object2.paddingTop = PX_16;
|
|
object.screenContainer = object2;
|
|
const TABLE_ROW_PADDING = (Native).modules.mobile.TABLE_ROW_PADDING;
|
|
object.stackPadding = {paddingHorizontal: TABLE_ROW_PADDING};
|
|
const env0_24 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
|
|
const PureComponent = value.PureComponent;
|
|
value = _fun83836(PureComponent);
|
|
const ThemeContext = (NativeModule).ThemeContext;
|
|
value.contextType = ThemeContext;
|
|
(FileImportTrackerModule).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 = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).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 _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 object = {};
|
|
userGuildSettingsStoreBinding = UserGuildSettingsStore;
|
|
const getChannelMessageNotifications = userGuildSettingsStoreBinding.getChannelMessageNotifications;
|
|
const binding = env0_3;
|
|
const channelIdBinding = channelId;
|
|
object.messageNotifications = Reflect.apply(getChannelMessageNotifications, userGuildSettingsStoreBinding, [binding,
|
|
channelIdBinding]);
|
|
object.muted = UserGuildSettingsStore.isChannelMuted(env0_3, channelIdBinding);
|
|
object.muteConfig = UserGuildSettingsStore.getChannelMuteConfig(env0_3, channelIdBinding);
|
|
object.guildMuted = UserGuildSettingsStore.isMuted(env0_3);
|
|
object.guildMessageNotifications = messageNotifications;
|
|
object.newForumThreadsCreated = channel != null && UserGuildSettingsStore.getNewForumThreadsCreated(channel);
|
|
object.defaultSetting = r1;
|
|
return object;
|
|
}
|
|
|
|
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 _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 ChannelSettingsNotifications2 = ChannelSettingsNotifications;
|
|
Inherits(ChannelSettingsNotifications2, a0);
|
|
return CreateClass(ChannelSettingsNotifications2, [{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 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 items2 = [a0];
|
|
const value3 = env1_6(ChannelSettingsNotifications);
|
|
const value6 = env1_5(this, _isNativeReflectConstruct_83827() ? global.Reflect.construct(value3, items2,
|
|
env1_6(this).constructor) : value3.apply(this, items2));
|
|
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 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 object = {};
|
|
let value = false;
|
|
if (muted === undefined) {
|
|
r2 = value;
|
|
} else {
|
|
object.muted = muted;
|
|
value = null;
|
|
object.mute_config = value != mute_config ? mute_config : value;
|
|
value = true;
|
|
r2 = value;
|
|
}
|
|
if (messageNotifications !== undefined) {
|
|
object.message_notifications = messageNotifications;
|
|
r2 = true;
|
|
}
|
|
if (r2) {
|
|
value = environment.__proto__.__proto__;
|
|
value = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
|
value.updateChannelOverrideSettings(channel.getGuildId(), channel.id, object, 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 object;
|
|
var value;
|
|
let binding = muted2;
|
|
const muted = binding.state.muted;
|
|
var muted2 = muted;
|
|
const channel = binding.props.channel;
|
|
if (muted) {
|
|
binding = muted2;
|
|
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;
|
|
object = {};
|
|
object.guildId = channel.getGuildId();
|
|
id = channel.id;
|
|
object.channelId = id;
|
|
object.onOptionPress = onOptionPress;
|
|
Reflect.apply(openLazy, defaultImport, [value, value2, object]);
|
|
}
|
|
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 object = {};
|
|
value = !muted;
|
|
object.muted = value;
|
|
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
|
|
return Reflect.apply(updateSetting, binding, [object, NotificationLabel.muted(value)]);
|
|
}
|
|
|
|
function onOptionPress(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 = (NotificationSettingsUtilsModule).NotificationLabel;
|
|
return Reflect.apply(updateSetting, binding, [a0, NotificationLabel.muted(a0.muted)]);
|
|
}
|
|
|
|
}
|
|
|
|
function handleTypeChange(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 _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 object = {};
|
|
const binding2 = env0_0;
|
|
object.messageNotifications = binding2;
|
|
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
|
|
return Reflect.apply(updateSetting, binding, [object, NotificationLabel.notifications(binding2)]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 channelName = UseChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore, true);
|
|
const jsxRuntimeEnv1_22Binding = jsxRuntimeEnv1_22;
|
|
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
|
|
const object2 = {};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
object2.description = Reflect.apply(string, intl, [t['6yI+JS']]);
|
|
object2.hasIcons = false;
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
const format = intl.format;
|
|
return (
|
|
<>
|
|
<TableRowGroup {...object2}>
|
|
<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 = (TableSwitchRowNativeModule).TableSwitchRow;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const Rkgjph = (IndexNativeModule).t.Rkgjph;
|
|
return (
|
|
<TableSwitchRow
|
|
label={Reflect.apply(string, intl, [Rkgjph])}
|
|
value={newForumThreadsCreated}
|
|
disabled={muted || guildMuted}
|
|
onValueChange={onValueChange_83848}
|
|
/>
|
|
);
|
|
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_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 object4;
|
|
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 = (TableRadioGroupNativeModule).TableRadioGroup;
|
|
const object = {value: messageNotifications};
|
|
object.onChange = this.handleTypeChange;
|
|
object.groupRef = this.radioGroupRef;
|
|
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss);
|
|
object.hasIcons = false;
|
|
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
|
|
const object2 = {};
|
|
if (isGuildStageVoice2) {
|
|
object2.disabled = muted || guildMuted;
|
|
object2.label = r8;
|
|
object2.subLabel = getDefaultNotificationsSublabel(defaultSetting);
|
|
object2.value = UserNotificationSettings.NULL;
|
|
value = <TableRadioRow {...object2} />;
|
|
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 {...object}>
|
|
{items2}
|
|
</TableRadioGroup>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
object2.label = r8;
|
|
object2.subLabel = getDefaultNotificationsSublabel(defaultSetting);
|
|
r0 = muted || guildMuted;
|
|
object2.disabled = r0;
|
|
object2.value = UserNotificationSettings.NULL;
|
|
items3 = [
|
|
<TableRadioRow {...object2} />,
|
|
];
|
|
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 {...object}>
|
|
{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 = (TextModule).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 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 = (TextModule).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 = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-feedback-warning"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 = (FluxModule).useStateFromStores([ChannelStore], _fun83854);
|
|
const value2 = (NotificationUtilsModule).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 _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);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83826, 10935, [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]) /* metro module 10935, 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] */;
|