110 lines
6.2 KiB
TypeScript
110 lines
6.2 KiB
TypeScript
/* Metro module 15846; source: stores/NotificationSettingsModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 1383, 5098, 1935, 4111, 1867, 4864, 661, 5099, 566, 694, 2] */
|
|
function _fun121858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:6, offset: 0x02552e7a, size: 429 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_7 = (require(1383) /* metro dependency 1383: ChannelRecord */).isGuildSelectableChannelType;
|
|
const guildCategoryStore = importDefault(5098) /* metro dependency 5098: GuildCategoryStore */;
|
|
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
|
|
const guildMemberCountStore = importDefault(4111) /* metro dependency 4111: GuildMemberCountStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
|
let value = require(661) /* metro dependency 661: Constants */;
|
|
const FormStates = value.FormStates;
|
|
const env0_14 = value.ChannelTypes;
|
|
let env0_16 = FormStates.CLOSED;
|
|
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
|
_fun121862(Store).displayName = 'NotificationSettingsModalStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{NOTIFICATION_SETTINGS_MODAL_OPEN: function({guildId}) {
|
|
env0_16 = FormStates.OPEN;
|
|
env0_15 = guildId;
|
|
}, NOTIFICATION_SETTINGS_MODAL_CLOSE: function() {
|
|
env0_16 = FormStates.CLOSED;
|
|
env0_15 = null;
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/NotificationSettingsModalStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_121859() { // fn#121859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:281, offset: 0x02553027, 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_121859_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun121862(a0) { // fn#121862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:497, offset: 0x02553089, size: 122 bytes, params: 2, frame: 16
|
|
const closure = NotificationSettingsModalStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: function() {
|
|
var env0_0 = this;
|
|
this.waitFor(GuildCategoryStore, GuildChannelStore, GuildMemberCountStore, GuildStore, UserGuildSettingsStore);
|
|
this.syncWith([UserGuildSettingsStore, GuildChannelStore, GuildStore], _fun121865);
|
|
}}, {key: 'isOpen', value: function() {
|
|
return CLOSED !== FormStates.CLOSED;
|
|
}}, {key: 'getProps', value: value_121867}]);
|
|
}
|
|
|
|
function value_121864() { // fn#121864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:877, offset: 0x02553103, size: 93 bytes, params: 1, frame: 20
|
|
this.waitFor(GuildCategoryStore, GuildChannelStore, GuildMemberCountStore, GuildStore, UserGuildSettingsStore);
|
|
this.syncWith([UserGuildSettingsStore, GuildChannelStore, GuildStore], _fun121865);
|
|
}
|
|
|
|
function value_121867() { // fn#121867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1032, offset: 0x0255318a, size: 279 bytes, params: 1, frame: 16
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const categories = GuildCategoryStore.getCategories(env1_15);
|
|
const object2 = {guildId: env1_15, categories: categories};
|
|
object2.guild = GuildStore.getGuild(env1_15);
|
|
object2.memberCount = GuildMemberCountStore.getMemberCount(env1_15);
|
|
object2.suppressEveryone = UserGuildSettingsStore.isSuppressEveryoneEnabled(env1_15);
|
|
object2.suppressRoles = UserGuildSettingsStore.isSuppressRolesEnabled(env1_15);
|
|
object2.mobilePush = UserGuildSettingsStore.isMobilePushEnabled(env1_15);
|
|
object2.muted = UserGuildSettingsStore.isMuted(env1_15);
|
|
object2.muteConfig = UserGuildSettingsStore.getMuteConfig(env1_15);
|
|
object2.messageNotifications = UserGuildSettingsStore.getMessageNotifications(env1_15);
|
|
object2.channelOverrides = UserGuildSettingsStore.getChannelOverrides(env1_15);
|
|
object2.channels = (importDefault(5099) /* metro dependency 5099: getFlattedChannelList */)(categories._categories,
|
|
categories, _fun121868);
|
|
return object2;
|
|
}
|
|
|
|
function _fun121865() { // fn#121865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:935, offset: 0x02553160, size: 19 bytes, params: 1, frame: 9
|
|
return env0_0.isOpen();
|
|
}
|
|
|
|
function _fun121868({channel}) { // fn#121868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16054:1452, offset: 0x025532a1, size: 46 bytes, params: 2, frame: 12
|
|
const type = channel.type;
|
|
const value = environment.__proto__.__proto__;
|
|
return isGuildSelectableChannelType(type) || type === ChannelTypes.GUILD_CATEGORY;
|
|
}
|
|
|