2026-10-06 22:12:49 +00:00
|
|
|
// Module ID: 12241
|
|
|
|
|
// Function ID: 12242
|
2026-09-18 20:18:48 +00:00
|
|
|
// Name: InAppNotificationSettingsModal
|
2026-10-06 22:12:49 +00:00
|
|
|
// Dependencies: [19, 2055, 2051, 4482, 5018, 1378, 1086, 21, 6541, 6536, 4990, 8057, 1127, 12242, 6801, 558, 576, 504, 5933, 6421, 2]
|
2026-09-18 20:18:48 +00:00
|
|
|
|
2026-10-06 22:12:49 +00:00
|
|
|
// Module 12241 (InAppNotificationSettingsModal)
|
|
|
|
|
import intl4 from "intl" /* 1127 */;
|
|
|
|
|
import ChannelRecord from "ChannelRecord" /* 2055 */;
|
|
|
|
|
import useChannelName from "useChannelName" /* 4990 */;
|
|
|
|
|
import NavigatorHeader2 from "NavigatorHeader" /* 5933 */;
|
|
|
|
|
import NotificationSettingsUtils from "NotificationSettingsUtils" /* 6536 */;
|
|
|
|
|
import NotificationSettingsModalActionCreatorsDefault from "NotificationSettingsModalActionCreators" /* 6541 */;
|
|
|
|
|
import openUserSettings from "openUserSettings" /* 6801 */;
|
|
|
|
|
import Form2 from "Form" /* 8057 */;
|
|
|
|
|
import ChannelSettingsNotificationsDefault from "ChannelSettingsNotifications" /* 12242 */;
|
|
|
|
|
import react from "react" /* 19 */;
|
|
|
|
|
import ChannelStore from "ChannelStore" /* 2051 */;
|
|
|
|
|
import RelationshipStore from "RelationshipStore" /* 4482 */;
|
|
|
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 5018 */;
|
|
|
|
|
import UserStore from "UserStore" /* 1378 */;
|
|
|
|
|
import Constants from "Constants" /* 1086 */;
|
|
|
|
|
import Fragment from "Fragment" /* 21 */;
|
|
|
|
|
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 20:18:48 +00:00
|
|
|
|
2026-10-06 22:12:49 +00:00
|
|
|
let _require;
|
|
|
|
|
|
|
|
|
|
let c10;
|
|
|
|
|
let c9;
|
|
|
|
|
let closure_12;
|
|
|
|
|
let unpackModuleId;
|
|
|
|
|
const isMultiUserDM = ChannelRecord.isMultiUserDM;
|
|
|
|
|
({ ChannelTypes: c9, UserSettingsSections: c10 } = Constants);
|
|
|
|
|
({ jsx: unpackModuleId, jsxs: closure_12 } = Fragment);
|
|
|
|
|
const PureComponent = react.PureComponent;
|
2026-09-18 20:18:48 +00:00
|
|
|
class InAppNotificationSettingsScreen extends PureComponent {
|
|
|
|
|
constructor() {
|
2026-10-06 22:12:49 +00:00
|
|
|
const applyArgumentsResult = HermesBuiltin.applyArguments(this, new.target);
|
|
|
|
|
const require = applyArgumentsResult;
|
2026-09-18 20:18:48 +00:00
|
|
|
applyArgumentsResult.handleGroupDMMute = function handleGroupDMMute() {
|
2026-10-06 22:12:49 +00:00
|
|
|
let NotificationLabel;
|
|
|
|
|
let channel;
|
|
|
|
|
let isMuted;
|
|
|
|
|
let obj2;
|
|
|
|
|
({ channel, isMuted } = require.props);
|
2026-09-18 20:18:48 +00:00
|
|
|
if (null != channel) {
|
2026-10-06 22:12:49 +00:00
|
|
|
const obj = { guildId: channel.getGuildId(), channelId: channel.id, settings: obj2, label: NotificationLabel.muted(!isMuted) };
|
|
|
|
|
const updateChannelOverrideSettings = NotificationSettingsModalActionCreatorsDefault.updateChannelOverrideSettings;
|
|
|
|
|
NotificationSettingsModalActionCreatorsDefault;
|
|
|
|
|
obj2 = { muted: !isMuted };
|
|
|
|
|
NotificationLabel = NotificationSettingsUtils.NotificationLabel;
|
|
|
|
|
const result = updateChannelOverrideSettings(obj);
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
applyArgumentsResult.handleOpenUserSettings = function handleOpenUserSettings() {
|
2026-10-06 22:12:49 +00:00
|
|
|
const obj = openUserSettings;
|
|
|
|
|
const obj2 = { screen: constants.NOTIFICATIONS };
|
|
|
|
|
obj.openUserSettings(obj2);
|
2026-09-18 20:18:48 +00:00
|
|
|
};
|
|
|
|
|
return applyArgumentsResult;
|
|
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
renderGroupDMNotificationSettings() {
|
|
|
|
|
let FormSwitchRow;
|
|
|
|
|
let intl;
|
|
|
|
|
let obj3;
|
|
|
|
|
let obj4;
|
|
|
|
|
const channel = this.props.channel;
|
|
|
|
|
if (null == channel) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
const obj = useChannelName;
|
|
|
|
|
const channelName = obj.computeChannelName(channel, UserStore, RelationshipStore);
|
|
|
|
|
const obj2 = { children: unpackModuleId(FormSwitchRow, obj3) };
|
|
|
|
|
const FormSection = Form2.FormSection;
|
|
|
|
|
obj3 = { label: intl.format(intl4.t["u/rEuc"], obj4), value: tmp2, onValueChange: tmp.handleGroupDMMute };
|
|
|
|
|
FormSwitchRow = Form2.FormSwitchRow;
|
|
|
|
|
intl = intl4.intl;
|
|
|
|
|
obj4 = { name: channelName };
|
|
|
|
|
return unpackModuleId(FormSection, obj2);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
renderTextChannelNotificationSettings() {
|
|
|
|
|
const channel = this.props.channel;
|
|
|
|
|
let tmp = null;
|
|
|
|
|
if (null != channel) {
|
|
|
|
|
const obj = { channelId: channel.id };
|
|
|
|
|
tmp = unpackModuleId(ChannelSettingsNotificationsDefault, obj);
|
|
|
|
|
}
|
|
|
|
|
return tmp;
|
|
|
|
|
}
|
|
|
|
|
renderChannelNotificationSettings() {
|
|
|
|
|
const self = this;
|
|
|
|
|
const channel = this.props.channel;
|
|
|
|
|
if (null == channel) {
|
|
|
|
|
return null;
|
|
|
|
|
} else {
|
|
|
|
|
const type = channel.type;
|
|
|
|
|
if (constants.GROUP_DM === type) {
|
|
|
|
|
return self.renderGroupDMNotificationSettings();
|
|
|
|
|
} else {
|
|
|
|
|
if (constants.GUILD_TEXT !== type) {
|
|
|
|
|
if (constants.GUILD_ANNOUNCEMENT !== type) {
|
|
|
|
|
if (constants.GUILD_APP !== type) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return self.renderTextChannelNotificationSettings();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let FormRow;
|
|
|
|
|
let intl;
|
|
|
|
|
let intl2;
|
|
|
|
|
let intl3;
|
|
|
|
|
let items;
|
|
|
|
|
let obj3;
|
|
|
|
|
const obj = { children: items };
|
|
|
|
|
const Form = Form2.Form;
|
|
|
|
|
items = [this.renderChannelNotificationSettings(), , ];
|
|
|
|
|
const obj2 = { title: intl.string(intl4.t.clE4PU), children: unpackModuleId(FormRow, obj3) };
|
|
|
|
|
const FormSection = Form2.FormSection;
|
|
|
|
|
intl = intl4.intl;
|
|
|
|
|
obj3 = { label: intl2.string(intl4.t.cHMaba), onPress: this.handleOpenUserSettings, trailing: unpackModuleId(Form2.FormRow.Arrow, {}) };
|
|
|
|
|
FormRow = Form2.FormRow;
|
|
|
|
|
intl2 = intl4.intl;
|
|
|
|
|
items[1] = unpackModuleId(FormSection, obj2);
|
|
|
|
|
const obj4 = { children: intl3.string(intl4.t.avgbp1) };
|
|
|
|
|
const FormHint = Form2.FormHint;
|
|
|
|
|
intl3 = intl4.intl;
|
|
|
|
|
items[2] = unpackModuleId(FormHint, obj4);
|
|
|
|
|
return closure_12(Form, obj);
|
|
|
|
|
}
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
|
|
|
|
const prototype = InAppNotificationSettingsScreen.prototype;
|
2026-10-06 22:12:49 +00:00
|
|
|
let ReactCompilerGating = ReactCompilerGating_mod;
|
|
|
|
|
let closure_14 = ReactCompilerGating.isReactCompilerEnabled() ? ((channel) => {
|
|
|
|
|
let first;
|
|
|
|
|
let tmp6;
|
|
|
|
|
const obj = channel(576);
|
|
|
|
|
const cResult = obj.c(6);
|
|
|
|
|
const tmp = channel;
|
|
|
|
|
channel = channel.channel;
|
|
|
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
|
|
|
const items = [UserGuildSettingsStore];
|
|
|
|
|
cResult[0] = items;
|
|
|
|
|
first = items;
|
2026-09-18 20:18:48 +00:00
|
|
|
} else {
|
2026-10-06 22:12:49 +00:00
|
|
|
first = cResult[0];
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
if (cResult[1] !== channel) {
|
|
|
|
|
const fn = function o() {
|
|
|
|
|
let isChannelMutedResult;
|
|
|
|
|
if (null != channel) {
|
|
|
|
|
if (isMultiUserDM(channel.type)) {
|
|
|
|
|
isChannelMutedResult = UserGuildSettingsStore.isChannelMuted(obj.getGuildId(), obj.id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return isChannelMutedResult;
|
|
|
|
|
};
|
|
|
|
|
cResult[1] = channel;
|
|
|
|
|
cResult[2] = fn;
|
|
|
|
|
tmp6 = fn;
|
2026-09-18 20:18:48 +00:00
|
|
|
} else {
|
2026-10-06 22:12:49 +00:00
|
|
|
tmp6 = cResult[2];
|
|
|
|
|
}
|
|
|
|
|
const tmpResult = tmp(504);
|
|
|
|
|
const stateFromStores = tmpResult.useStateFromStores(first, tmp6);
|
|
|
|
|
if (cResult[3] === channel) {
|
|
|
|
|
let tmp8;
|
|
|
|
|
if (cResult[4] === stateFromStores) {
|
|
|
|
|
tmp8 = cResult[5];
|
|
|
|
|
}
|
|
|
|
|
return tmp8;
|
|
|
|
|
}
|
|
|
|
|
const tmp9 = closure_11(InAppNotificationSettingsScreen, { channel, isMuted: stateFromStores });
|
|
|
|
|
cResult[3] = channel;
|
|
|
|
|
cResult[4] = stateFromStores;
|
|
|
|
|
cResult[5] = tmp9;
|
|
|
|
|
tmp8 = tmp9;
|
|
|
|
|
}) : ((channel) => {
|
|
|
|
|
channel = channel.channel;
|
|
|
|
|
const obj = channel(504);
|
|
|
|
|
const items = [UserGuildSettingsStore];
|
|
|
|
|
const obj2 = {
|
|
|
|
|
channel,
|
|
|
|
|
isMuted: obj.useStateFromStores(items, () => {
|
|
|
|
|
let isChannelMutedResult;
|
|
|
|
|
if (null != channel) {
|
|
|
|
|
if (isMultiUserDM(channel.type)) {
|
|
|
|
|
isChannelMutedResult = UserGuildSettingsStore.isChannelMuted(obj.getGuildId(), obj.id);
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
return isChannelMutedResult;
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
return closure_11(InAppNotificationSettingsScreen, obj2);
|
|
|
|
|
});
|
|
|
|
|
const memo = react.memo;
|
|
|
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
|
|
|
const memoResult = memo(ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
|
|
|
|
|
let channelId;
|
|
|
|
|
let closure_0;
|
|
|
|
|
let obj4;
|
|
|
|
|
let onClose;
|
|
|
|
|
let tmpResult;
|
|
|
|
|
const obj = require("react");
|
|
|
|
|
const cResult = obj.c(5);
|
|
|
|
|
({ channelId, onClose } = arg0);
|
|
|
|
|
if (cResult[0] === channelId) {
|
|
|
|
|
let tmp4;
|
|
|
|
|
let tmp5;
|
|
|
|
|
if (cResult[1] === onClose) {
|
|
|
|
|
tmp4 = cResult[2];
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
if (cResult[3] !== tmp4) {
|
|
|
|
|
const obj2 = { screens: tmp4, initialRouteName: "IN_APP_NOTIFICATION_SETTINGS" };
|
|
|
|
|
const tmp7 = closure_11(require("Navigator").Navigator, obj2);
|
|
|
|
|
cResult[3] = tmp4;
|
|
|
|
|
cResult[4] = tmp7;
|
|
|
|
|
tmp5 = tmp7;
|
|
|
|
|
} else {
|
|
|
|
|
tmp5 = cResult[4];
|
|
|
|
|
}
|
|
|
|
|
return tmp5;
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
_require = ChannelStore.getChannel(channelId);
|
|
|
|
|
const obj3 = { IN_APP_NOTIFICATION_SETTINGS: obj4 };
|
|
|
|
|
obj4 = {
|
|
|
|
|
headerTitle() {
|
|
|
|
|
let channelName;
|
|
|
|
|
let intl;
|
|
|
|
|
const obj = { title: intl.string(channelId(closure_2_2[12]).t.h850Ss), subtitle: channelName };
|
|
|
|
|
const NavigatorHeader = channelId(closure_2_2[18]).NavigatorHeader;
|
|
|
|
|
intl = channelId(closure_2_2[12]).intl;
|
|
|
|
|
channelName = null;
|
|
|
|
|
const tmp2 = closure_2_11;
|
|
|
|
|
const tmp3 = channelId;
|
|
|
|
|
const tmp4 = closure_2_2;
|
|
|
|
|
if (null != channel) {
|
|
|
|
|
const tmp3Result = tmp3(tmp4[10]);
|
|
|
|
|
channelName = tmp3Result.computeChannelName(tmp, closure_2_8, closure_2_6, true);
|
|
|
|
|
}
|
|
|
|
|
return tmp2(NavigatorHeader, obj);
|
|
|
|
|
},
|
|
|
|
|
headerLeft: tmpResult.getHeaderCloseButton(onClose),
|
|
|
|
|
render() {
|
|
|
|
|
const obj = { channel };
|
|
|
|
|
return closure_2_11(closure_2_14, obj);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
cResult[0] = channelId;
|
|
|
|
|
cResult[1] = onClose;
|
|
|
|
|
cResult[2] = obj3;
|
|
|
|
|
tmp4 = obj3;
|
|
|
|
|
tmpResult = require("NavigatorHeader");
|
|
|
|
|
}) : ((channelId) => {
|
2026-09-18 20:18:48 +00:00
|
|
|
channelId = channelId.channelId;
|
|
|
|
|
const onClose = channelId.onClose;
|
|
|
|
|
const items = [channelId, onClose];
|
2026-10-06 22:12:49 +00:00
|
|
|
const screens = react.useMemo(() => {
|
|
|
|
|
let obj2;
|
|
|
|
|
let obj3;
|
2026-09-18 20:18:48 +00:00
|
|
|
const channel = ChannelStore.getChannel(channelId);
|
2026-10-06 22:12:49 +00:00
|
|
|
let obj = { IN_APP_NOTIFICATION_SETTINGS: obj2 };
|
|
|
|
|
obj2 = {
|
2026-09-18 20:18:48 +00:00
|
|
|
headerTitle() {
|
2026-10-06 22:12:49 +00:00
|
|
|
let channelName;
|
|
|
|
|
let intl;
|
|
|
|
|
const obj = { title: intl.string(channelId(closure_2_2[12]).t.h850Ss), subtitle: channelName };
|
|
|
|
|
const NavigatorHeader = channelId(closure_2_2[18]).NavigatorHeader;
|
|
|
|
|
intl = channelId(closure_2_2[12]).intl;
|
|
|
|
|
channelName = null;
|
|
|
|
|
const tmp2 = closure_2_11;
|
|
|
|
|
const tmp3 = channelId;
|
|
|
|
|
const tmp4 = closure_2_2;
|
|
|
|
|
if (null != channel) {
|
|
|
|
|
const tmp3Result = tmp3(tmp4[10]);
|
|
|
|
|
channelName = tmp3Result.computeChannelName(tmp, closure_2_8, closure_2_6, true);
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
2026-10-06 22:12:49 +00:00
|
|
|
return tmp2(NavigatorHeader, obj);
|
2026-09-18 20:18:48 +00:00
|
|
|
},
|
2026-10-06 22:12:49 +00:00
|
|
|
headerLeft: obj3.getHeaderCloseButton(onClose),
|
2026-09-18 20:18:48 +00:00
|
|
|
render() {
|
2026-10-06 22:12:49 +00:00
|
|
|
const obj = { channel };
|
|
|
|
|
return closure_2_11(closure_2_14, obj);
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
|
|
|
|
};
|
2026-10-06 22:12:49 +00:00
|
|
|
obj3 = NavigatorHeader2;
|
2026-09-18 20:18:48 +00:00
|
|
|
return obj;
|
|
|
|
|
}, items);
|
2026-10-06 22:12:49 +00:00
|
|
|
return closure_11(channelId(6421).Navigator, { screens, initialRouteName: "IN_APP_NOTIFICATION_SETTINGS" });
|
|
|
|
|
}));
|
|
|
|
|
let result = size.fileFinishedImporting("components_native/InAppNotificationSettingsModal.tsx");
|
|
|
|
|
|
|
|
|
|
export default memoResult;
|