84 lines
5.6 KiB
TypeScript
84 lines
5.6 KiB
TypeScript
/* Metro module 10954; source: modules/notifications/settings/native/NotificationSettingsMessageNotificationChannelActionSheet.tsx; dependencies: [31, 4864, 661, 4865, 670, 33, 10941, 10953, 1244, 10942, 6613, 6610, 2] */
|
|
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
|
|
import NotificationSettingsModalActionCreators from '../../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
|
|
import NotificationSettingsMessageNotificationActionSheet from './NotificationSettingsMessageNotificationActionSheet.tsx'; /* Metro dependency 10953 */
|
|
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as UserSettingsConstantsModule from '../../../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
|
|
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
|
|
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
|
|
import * as NotficationSettingsChannelFlagUtilsModule from '../utils/notficationSettingsChannelFlagUtils.tsx'; /* Metro dependency 10941 */
|
|
|
|
function _fun83943(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:6, offset: 0x01f2fd0f, size: 220 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotificationChannelActionSheet.tsx');
|
|
exports.default = NotificationSettingsMessageNotificationChannelActionSheet;
|
|
function NotificationSettingsMessageNotificationChannelActionSheet(a0) { // fn#83944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:374, offset: 0x01f2fdeb, size: 212 bytes, params: 2, frame: 20
|
|
var r5;
|
|
var intl;
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const {unread,
|
|
notification} = (NotficationSettingsChannelFlagUtilsModule).useChannelPresetSettings(a0.channel);
|
|
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
if (notification === ALL_MESSAGES) {
|
|
r5 = value2;
|
|
} else if (unread === UnreadSetting.ALL_MESSAGES) {
|
|
r5 = value2;
|
|
} else {
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eP8yWU);
|
|
}
|
|
return (
|
|
<NotificationSettingsMessageNotificationActionSheet
|
|
context="channel"
|
|
value={notification}
|
|
allMessagesSubLabel={r5}
|
|
onChange={onChange_83945}
|
|
/>
|
|
);
|
|
function NotificationSettingsMessageNotificationChannelActionSheetOnChange(a0) { // fn#83945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11140:679, owner: NotificationSettingsMessageNotificationChannelActionSheet.onChange, offset: 0x01f2febf, size: 250 bytes, params: 2, frame: 21
|
|
var moduleValue;
|
|
var withChannelUnreadFlags;
|
|
var userGuildSettingsStoreBinding;
|
|
var getChannelIdFlags;
|
|
var binding;
|
|
var channel;
|
|
var guild_id;
|
|
const object = {message_notifications: a0};
|
|
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
if (a0 === ALL_MESSAGES && unread !== UnreadSetting.ALL_MESSAGES) {
|
|
moduleValue = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
|
|
withChannelUnreadFlags = moduleValue.withChannelUnreadFlags;
|
|
userGuildSettingsStoreBinding = UserGuildSettingsStore;
|
|
getChannelIdFlags = userGuildSettingsStoreBinding.getChannelIdFlags;
|
|
binding = env0_0;
|
|
channel = binding.channel;
|
|
guild_id = channel.guild_id;
|
|
channel = binding.channel;
|
|
object.flags = Reflect.apply(withChannelUnreadFlags, moduleValue, [Reflect.apply(getChannelIdFlags,
|
|
userGuildSettingsStoreBinding, [guild_id, channel.id]),
|
|
ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES]);
|
|
}
|
|
const defaultImport = NotificationSettingsModalActionCreators;
|
|
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
|
|
binding = env0_0;
|
|
guild_id = binding.channel.guild_id;
|
|
const id = binding.channel.id;
|
|
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
|
|
Reflect.apply(updateChannelOverrideSettings, defaultImport, [guild_id, id, object,
|
|
NotificationLabel.notifications(a0)]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83943, 10954, [31, 4864, 661, 4865, 670, 33, 10941, 10953, 1244, 10942, 6613, 6610,
|
|
2]) /* metro module 10954, dependencies: [31, 4864, 661, 4865, 670, 33, 10941, 10953, 1244, 10942, 6613, 6610, 2] */;
|