160 lines
11 KiB
TypeScript
160 lines
11 KiB
TypeScript
/* Metro module 10940; source: modules/notifications/settings/native/NotificationSettingsChannel.tsx; dependencies: [31, 27, 4864, 33, 4501, 697, 10941, 1244, 4805, 1484, 5282, 6613, 6610, 566, 7972, 10943, 10944, 10948, 10955, 10961, 4578, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
|
|
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
|
|
import NotificationSettingsModalActionCreators from '../../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
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 UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
|
|
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
|
|
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
import * as NotficationSettingsChannelFlagUtilsModule from '../utils/notficationSettingsChannelFlagUtils.tsx'; /* Metro dependency 10941 */
|
|
import * as NotificationSettingsPresetsModule from './NotificationSettingsPresets.tsx'; /* Metro dependency 10944 */
|
|
import * as NotificationSettingsMessageNotificationModule from './NotificationSettingsMessageNotification.tsx'; /* Metro dependency 10948 */
|
|
import * as NotificationSettingsMessageUnreadModule from './NotificationSettingsMessageUnread.tsx'; /* Metro dependency 10955 */
|
|
|
|
function _fun83878(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:6, offset: 0x01f2c873, size: 264 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
|
|
const env0_8 = Reflect.apply(createStyles, value, [{screenContainer: {'flex': 1, 'backgroundColor': null,
|
|
'padding': 16, backgroundColor: BACKGROUND_BASE_LOW}}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsChannel.tsx');
|
|
exports.default = NotificationSettingsChannel;
|
|
function NotificationSettingsChannel(a0) { // fn#83879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:385, offset: 0x01f2c97b, size: 870 bytes, params: 2, frame: 30
|
|
var r6;
|
|
var r5;
|
|
var NotificationSettingsMuteBanner;
|
|
var moduleValue4;
|
|
var Button;
|
|
var object;
|
|
const env0_0 = a0;
|
|
const value2 = (NotficationSettingsChannelFlagUtilsModule).useChannelPresetInheritance(a0.channel);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const env0_1 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h850Ss);
|
|
const env0_2 = (UseChannelName)(a0.channel);
|
|
const env0_3 = (UseNavigationNativeModule).useNavigation();
|
|
const styles = useStyles();
|
|
const binding = env0_3;
|
|
binding.useLayoutEffect(_fun83880);
|
|
const value3 = binding.useCallback(_fun83883, [a0.channel]);
|
|
const value4 = binding.useCallback(_fun83884, [a0.channel]);
|
|
const value5 = (FluxModule).useStateFromStoresObject([UserGuildSettingsStore],
|
|
_fun83885);
|
|
const Form = (NativeModule).Form;
|
|
const muted = value5.muted;
|
|
if (muted) {
|
|
NotificationSettingsMuteBanner = (require(10943) /* metro dependency 10943: NotificationSettingsMuteBanner */).NotificationSettingsMuteBanner;
|
|
var notificationSettingsMuteBannerProps2 = {style: {marginBottom: 16},
|
|
title: intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6MCxAy'])};
|
|
moduleValue4 = require(10943) /* metro dependency 10943: NotificationSettingsMuteBanner */;
|
|
notificationSettingsMuteBannerProps2.subtitle = moduleValue4.getMuteBannerSubtitleFromConfig(value5.config);
|
|
notificationSettingsMuteBannerProps2.onPressUnmute = value4;
|
|
r6 = <NotificationSettingsMuteBanner {...notificationSettingsMuteBannerProps2} />;
|
|
} else {
|
|
r6 = muted;
|
|
}
|
|
const items2 = [r6];
|
|
const NotificationSettingsChannelPresets = (NotificationSettingsPresetsModule).NotificationSettingsChannelPresets;
|
|
items2[1] = <NotificationSettingsChannelPresets channel={a0.channel} />;
|
|
const NotificationSettingsChannelMessageNotification = (NotificationSettingsMessageNotificationModule).NotificationSettingsChannelMessageNotification;
|
|
items2[2] = <NotificationSettingsChannelMessageNotification style={{marginTop: 24}} channel={a0.channel} />;
|
|
const NotificationSettingsChannelMessageUnread = (NotificationSettingsMessageUnreadModule).NotificationSettingsChannelMessageUnread;
|
|
items2[3] = <NotificationSettingsChannelMessageUnread style={{marginTop: 24}} channel={a0.channel} />;
|
|
items2[4] = a0.channel.isForumLikeChannel() && ((NotificationSettingsChannelPost) => <NotificationSettingsChannelPost style={{marginTop: 24}} channel={a0.channel} />)((require(10961) /* metro dependency 10961: NotificationSettingsChannelPost */).NotificationSettingsChannelPost);
|
|
const inherited = value2.inherited;
|
|
if (inherited) {
|
|
r5 = !inherited;
|
|
} else {
|
|
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
r5 = (
|
|
<View style={{marginTop: 24}}>
|
|
<Button
|
|
variant="secondary"
|
|
onPress={value3}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3PBFN6'])}
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
items2[5] = r5;
|
|
return (
|
|
<Form style={styles.screenContainer}>
|
|
{items2}
|
|
</Form>
|
|
);
|
|
function _fun83880() { // fn#83880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:590, offset: 0x01f2cce1, size: 161 bytes, params: 1, frame: 22
|
|
var environment;
|
|
var value;
|
|
let binding = env0_3;
|
|
let setOptions = binding.setOptions;
|
|
let object = {};
|
|
object.title = '' + env0_1 + ' (' + env0_2 + ')';
|
|
object.headerTitle = headerTitle_83881;
|
|
Reflect.apply(setOptions, binding, [object]);
|
|
if (env0_0.inGuildContext) {
|
|
binding = env0_3;
|
|
setOptions = binding.setOptions;
|
|
object = {};
|
|
value = environment.__proto__;
|
|
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
|
|
object.headerLeft = value.getHeaderBackButton(_fun83882);
|
|
Reflect.apply(setOptions, binding, [object]);
|
|
}
|
|
function headerTitle_83881() { // fn#83881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:641, offset: 0x01f2cd82, size: 65 bytes, params: 1, frame: 15
|
|
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
|
|
return <NavigatorHeader title={env1_1} subtitle={env1_2} />;
|
|
}
|
|
|
|
function _fun83882() { // fn#83882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:769, offset: 0x01f2cdc3, size: 19 bytes, params: 1, frame: 9
|
|
return env1_3.popToTop();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun83883() { // fn#83883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:814, offset: 0x01f2cdd6, size: 66 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
|
|
const updateChannelToGuildDefault = value.updateChannelToGuildDefault;
|
|
const binding = env0_0;
|
|
return Reflect.apply(updateChannelToGuildDefault, value, [binding.channel.guild_id, binding.channel.id]);
|
|
}
|
|
|
|
function _fun83884() { // fn#83884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:918, offset: 0x01f2ce18, size: 110 bytes, params: 1, frame: 20
|
|
const defaultImport = NotificationSettingsModalActionCreators;
|
|
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
|
|
const binding = env0_0;
|
|
const guild_id = binding.channel.guild_id;
|
|
const id = binding.channel.id;
|
|
const NotificationLabels = (NotificationSettingsUtilsModule).NotificationLabels;
|
|
const Unmuted = NotificationLabels.Unmuted;
|
|
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guild_id, id, {muted: false}, Unmuted]);
|
|
}
|
|
|
|
function _fun83885() { // fn#83885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11126:1098, offset: 0x01f2ce86, size: 92 bytes, params: 1, frame: 15
|
|
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
|
|
const getChannelMuteConfig = userGuildSettingsStoreBinding.getChannelMuteConfig;
|
|
const binding = env0_0;
|
|
return {config: Reflect.apply(getChannelMuteConfig, userGuildSettingsStoreBinding, [binding.channel.guild_id,
|
|
binding.channel.id]), muted: userGuildSettingsStoreBinding.isChannelMuted(binding.channel.guild_id,
|
|
binding.channel.id)};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83878, 10940, [31, 27, 4864, 33, 4501, 697, 10941, 1244, 4805, 1484, 5282, 6613, 6610, 566, 7972,
|
|
10943, 10944, 10948, 10955, 10961, 4578,
|
|
2]) /* metro module 10940, dependencies: [31, 27, 4864, 33, 4501, 697, 10941, 1244, 4805, 1484, 5282, 6613, 6610, 566, 7972, 10943, 10944, 10948, 10955, 10961, 4578, 2] */;
|