Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
91 lines
4.9 KiB
TypeScript
91 lines
4.9 KiB
TypeScript
// Module ID: 10180
|
|
// Function ID: 10181
|
|
// Name: NotificationSettingsChannel
|
|
// Dependencies: [19, 17, 4755, 21, 4574, 576, 10181, 1114, 4727, 1483, 5638, 7133, 7128, 504, 8626, 10183, 10184, 10188, 10195, 10201, 4989, 2]
|
|
// Exports: default
|
|
|
|
// Module 10180 (NotificationSettingsChannel)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import useChannelNameDefault from "useChannelName" /* 4727 */;
|
|
import NavigatorHeader from "NavigatorHeader" /* 5638 */;
|
|
import NotificationSettingsUtils from "NotificationSettingsUtils" /* 7128 */;
|
|
import NotificationSettingsModalActionCreatorsDefault from "NotificationSettingsModalActionCreators" /* 7133 */;
|
|
import notficationSettingsChannelFlagUtils from "notficationSettingsChannelFlagUtils" /* 10181 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4755 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const View = fn(17).View;
|
|
const jsxProd = fn(21);
|
|
({ jsx: metroRequire, jsxs: closure_7 } = jsxProd);
|
|
const createStyles = fn(4574);
|
|
let obj2 = { screenContainer: { flex: 1, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, padding: 16 } };
|
|
let closure_8 = createStyles.createStyles(obj2);
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsChannel.tsx");
|
|
|
|
export default function NotificationSettingsChannel(channel) {
|
|
_require = channel;
|
|
const channelPresetInheritance = require("notficationSettingsChannelFlagUtils").useChannelPresetInheritance(channel.channel);
|
|
const intl = require("util").intl;
|
|
importDefault = intl.string(require("util").t.h850Ss);
|
|
dependencyMap = useChannelNameDefault(channel.channel);
|
|
const obj = require("notficationSettingsChannelFlagUtils");
|
|
noop = require("useNavigation").useNavigation();
|
|
const obj2 = require("useNavigation");
|
|
const layoutEffect = noop.useLayoutEffect(() => {
|
|
options.setOptions({
|
|
title: "" + title + " (" + subtitle + ")",
|
|
headerTitle() {
|
|
return closure_2_6(closure_0(subtitle[10]).NavigatorHeader, { title, subtitle });
|
|
}
|
|
});
|
|
if (channel.inGuildContext) {
|
|
const obj3 = { headerLeft: NavigatorHeader.getHeaderBackButton(() => options.popToTop()) };
|
|
options.setOptions(obj3);
|
|
}
|
|
});
|
|
const items = [channel.channel];
|
|
const items1 = [channel.channel];
|
|
const callback = noop.useCallback(() => notficationSettingsChannelFlagUtils.updateChannelToGuildDefault(channel.channel.guild_id, channel.channel.id), items);
|
|
const callback1 = noop.useCallback(() => {
|
|
const result = NotificationSettingsModalActionCreatorsDefault.updateChannelOverrideSettings(channel.channel.guild_id, channel.channel.id, { muted: false }, NotificationSettingsUtils.NotificationLabels.Unmuted);
|
|
}, items1);
|
|
const tmp4 = closure_8();
|
|
const items2 = [UserGuildSettingsStore];
|
|
const stateFromStoresObject = require("initialize").useStateFromStoresObject(items2, () => ({ config: UserGuildSettingsStore.getChannelMuteConfig(channel.channel.guild_id, channel.channel.id), muted: UserGuildSettingsStore.isChannelMuted(channel.channel.guild_id, channel.channel.id) }));
|
|
let obj4 = { style: tmp4.screenContainer, children: null };
|
|
let muted = stateFromStoresObject.muted;
|
|
if (muted) {
|
|
const obj5 = { style: { marginBottom: 16 }, title: null, subtitle: null, onPressUnmute: null };
|
|
const intl2 = tmp(1114).intl;
|
|
obj5.title = intl2.string(tmp(1114).t["6MCxAy"]);
|
|
obj5.subtitle = tmp(10183).getMuteBannerSubtitleFromConfig(stateFromStoresObject.config);
|
|
obj5.onPressUnmute = callback1;
|
|
muted = closure_6(tmp(10183).NotificationSettingsMuteBanner, obj5);
|
|
const tmpResult = tmp(10183);
|
|
}
|
|
const items3 = [muted, closure_6(require("NotificationSettingsPresets").NotificationSettingsChannelPresets, { channel: channel.channel }), closure_6(require("NotificationSettingsMessageNotification").NotificationSettingsChannelMessageNotification, { style: { marginTop: 24 }, channel: channel.channel }), closure_6(require("NotificationSettingsMessageUnread").NotificationSettingsChannelMessageUnread, { style: { marginTop: 24 }, channel: channel.channel }), , ];
|
|
channel = channel.channel;
|
|
let isForumLikeChannelResult = channel.isForumLikeChannel();
|
|
if (isForumLikeChannelResult) {
|
|
const obj9 = { style: { marginTop: 24 }, channel: channel.channel };
|
|
isForumLikeChannelResult = tmp11(tmp(10201).NotificationSettingsChannelPost, obj9);
|
|
}
|
|
items3[4] = isForumLikeChannelResult;
|
|
const inherited = channelPresetInheritance.inherited;
|
|
let tmp11Result = !inherited;
|
|
if (!inherited) {
|
|
const obj10 = { style: { marginTop: 24 }, children: null };
|
|
const obj11 = { variant: "secondary", onPress: callback, text: null };
|
|
const intl3 = tmp(1114).intl;
|
|
obj11.text = intl3.string(tmp(1114).t["3PBFN6"]);
|
|
obj10.children = tmp11(tmp(4989).Button, obj11);
|
|
tmp11Result = tmp11(View, obj10);
|
|
}
|
|
items3[5] = tmp11Result;
|
|
obj4.children = items3;
|
|
return closure_7(require("Form").Form, obj4);
|
|
};
|