Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
+16
@@ -0,0 +1,16 @@
|
||||
/* Metro module 11315; source: modules/notifications/settings_unread_notice/UnreadSettingNoticeImpressionTracking.tsx; dependencies: [8742, 480, 2] */
|
||||
function _fun86322(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11501:6, offset: 0x01f90c74, size: 103 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings_unread_notice/UnreadSettingNoticeImpressionTracking.tsx');
|
||||
exports.default = function(a0) {
|
||||
var defaultImport = importDefault(dependencyMap[0]);
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[1]).ImpressionTypes.VIEW;
|
||||
object.name = require(dependencyMap[1]).ImpressionNames.NOTIFICATION_SETTING_UNREAD_NUDGE;
|
||||
defaultImport(object, undefined, [a0.id]);
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,502 @@
|
||||
/* Metro module 11311; source: modules/notifications/settings_unread_notice/UnreadSettingNoticeStore2.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 1379, 1867, 1934, 4864, 661, 4865, 670, 672, 21, 1391, 10941, 566, 694, 2] */
|
||||
function _fun86285(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:6, offset: 0x01f8ef21, size: 919 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_4 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_5 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_6 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_7 = importDefault(18) /* metro dependency 18 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
|
||||
const env0_14 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
||||
const env0_15 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
|
||||
object2 = {};
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
object2.timeSinceJoin = 1 * HOUR;
|
||||
object2.sends = 1;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let MINUTE = Millis.MINUTE;
|
||||
object2.viewTime = 1 * MINUTE;
|
||||
const items2 = [object2];
|
||||
object2 = {};
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const DAY = Millis.DAY;
|
||||
object2.timeSinceJoin = 1 * DAY;
|
||||
object2.sends = 2;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
object2.viewTime = 2 * MINUTE;
|
||||
items2[1] = object2;
|
||||
object2 = {};
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let WEEK = Millis.WEEK;
|
||||
object2.timeSinceJoin = 1 * WEEK;
|
||||
object2.sends = 5;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
object2.viewTime = 5 * MINUTE;
|
||||
items2[2] = object2;
|
||||
object2 = {};
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const DAYS_30 = Millis.DAYS_30;
|
||||
object2.timeSinceJoin = 1 * DAYS_30;
|
||||
object2.sends = 10;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
object2.viewTime = 30 * MINUTE;
|
||||
items2[3] = object2;
|
||||
const env0_17 = 5 * items2[items2.length - 1].viewTime;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
WEEK = Millis.WEEK;
|
||||
object2 = {channels: {}};
|
||||
const Set = global.Set;
|
||||
let set = new Set();
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
set = _fun86295(PersistedStore);
|
||||
set.displayName = 'UnreadSettingNoticeStore2';
|
||||
set.persistKey = 'UnreadSettingNoticeStore2';
|
||||
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {CHANNEL_SELECT: function() {
|
||||
var value2 = trackChannel();
|
||||
env0_21 = SelectedChannelStore.getChannelId();
|
||||
var Date = global.Date;
|
||||
env0_22 = Date.now();
|
||||
return value2;
|
||||
}, CONNECTION_OPEN: CONNECTION_OPEN_86302, MESSAGE_CREATE: MESSAGE_CREATE_86304});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings_unread_notice/UnreadSettingNoticeStore2.tsx');
|
||||
exports.default = set;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_86286() { // fn#86286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:303, offset: 0x01f8f2b8, 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_86286_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function trackChannel() { // fn#86289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:923, offset: 0x01f8f31a, size: 189 bytes, params: 1, frame: 17
|
||||
var orCreateChannelState_86292;
|
||||
var lastActionTime;
|
||||
var Date;
|
||||
var viewDuration;
|
||||
var value4;
|
||||
if (env0_21 != null) {
|
||||
if (shouldTrackChannel(env0_21)) {
|
||||
orCreateChannelState_86292 = getOrCreateChannelState_86292(env0_21);
|
||||
lastActionTime = orCreateChannelState_86292.lastActionTime;
|
||||
Date = global.Date;
|
||||
if (lastActionTime > Date.now() - (importDefault(672) /* metro dependency 672: Durations */).Millis.DAY) {
|
||||
viewDuration = orCreateChannelState_86292.viewDuration;
|
||||
if (viewDuration > env0_17) {
|
||||
return false;
|
||||
}
|
||||
value4 = global.Date.now();
|
||||
orCreateChannelState_86292.lastActionTime = value4;
|
||||
viewDuration = orCreateChannelState_86292.viewDuration;
|
||||
orCreateChannelState_86292.viewDuration = viewDuration + (value4 - env0_22);
|
||||
env0_22 = value4;
|
||||
return true;
|
||||
}
|
||||
Date = global.Date;
|
||||
value4 = Date.now();
|
||||
orCreateChannelState_86292.lastActionTime = value4;
|
||||
viewDuration = orCreateChannelState_86292.viewDuration;
|
||||
orCreateChannelState_86292.viewDuration = viewDuration + (value4 - env0_22);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function startInterval() { // fn#86290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:1183, offset: 0x01f8f3d7, size: 121 bytes, params: 1, frame: 14
|
||||
if (env0_23 !== 0) {
|
||||
global.clearInterval(env0_23);
|
||||
}
|
||||
if (UserGuildSettingsStore.useNewNotifications) {
|
||||
env0_23 = global.setInterval(_fun86291,
|
||||
15 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getOrCreateChannelState_86292(a0) { // fn#86292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:1353, offset: 0x01f8f470, size: 67 bytes, params: 2, frame: 4
|
||||
if (!(a0 in env0_19.channels)) {
|
||||
env0_19.channels[a0] = {'lastActionTime': 0, 'viewDuration': 0, 'numSends': 0};
|
||||
}
|
||||
return env0_19.channels[a0];
|
||||
}
|
||||
|
||||
function shouldTrackChannel(a0) { // fn#86293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:1488, offset: 0x01f8f4b3, size: 254 bytes, params: 2, frame: 15
|
||||
var binding;
|
||||
var basicChannel;
|
||||
var guild_id;
|
||||
var isGuildOrCategoryOrChannelMuted;
|
||||
var id;
|
||||
var hasAnyOverrideBinding;
|
||||
var unreadSetting;
|
||||
var getChannelUnreadSetting;
|
||||
if (UserGuildSettingsStore.useNewNotifications) {
|
||||
binding = env0_20;
|
||||
if (binding.has(a0)) {
|
||||
return false;
|
||||
}
|
||||
basicChannel = ChannelStore.getBasicChannel(a0);
|
||||
if (basicChannel == null) {
|
||||
return false;
|
||||
}
|
||||
guild_id = basicChannel.guild_id;
|
||||
if (guild_id == null) {
|
||||
return false;
|
||||
}
|
||||
isGuildOrCategoryOrChannelMuted = UserGuildSettingsStore.isGuildOrCategoryOrChannelMuted;
|
||||
guild_id = basicChannel.guild_id;
|
||||
id = basicChannel.id;
|
||||
if (Reflect.apply(isGuildOrCategoryOrChannelMuted, UserGuildSettingsStore, [guild_id, id])) {
|
||||
return false;
|
||||
}
|
||||
hasAnyOverrideBinding = hasAnyOverride;
|
||||
guild_id = basicChannel.guild_id;
|
||||
id = basicChannel.id;
|
||||
if (hasAnyOverrideBinding(guild_id, id)) {
|
||||
return false;
|
||||
}
|
||||
hasAnyOverrideBinding = hasAnyOverride;
|
||||
guild_id = basicChannel.guild_id;
|
||||
if (hasAnyOverrideBinding(guild_id, basicChannel.parent_id)) {
|
||||
return false;
|
||||
}
|
||||
unreadSetting = UserGuildSettingsStore.resolveUnreadSetting(basicChannel);
|
||||
getChannelUnreadSetting = UserGuildSettingsStore.getChannelUnreadSetting;
|
||||
guild_id = basicChannel.guild_id;
|
||||
id = basicChannel.id;
|
||||
return Reflect.apply(getChannelUnreadSetting, UserGuildSettingsStore, [guild_id,
|
||||
id]) === UnreadSetting.UNSET && unreadSetting !== UnreadSetting.ALL_MESSAGES;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function hasAnyOverride(a0, a1) { // fn#86294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:1910, offset: 0x01f8f5b1, size: 170 bytes, params: 3, frame: 17
|
||||
var r1;
|
||||
var r2;
|
||||
var r0;
|
||||
var value5;
|
||||
var moduleValue;
|
||||
if (a1 == null) {
|
||||
return false;
|
||||
}
|
||||
const getChannelOverrides = UserGuildSettingsStore.getChannelOverrides;
|
||||
const property = Reflect.apply(getChannelOverrides, UserGuildSettingsStore, [a0])[a1];
|
||||
const value2 = property != null;
|
||||
if (value2) {
|
||||
r1 = property.message_notifications != null && property.message_notifications !== UserNotificationSettings.NULL;
|
||||
if (!r1) {
|
||||
value5 = property.flags == null;
|
||||
if (value5) {
|
||||
r2 = value5;
|
||||
} else {
|
||||
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
||||
r2 = !moduleValue.hasAnyFlag(property.flags,
|
||||
ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES | ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS);
|
||||
}
|
||||
r1 = !r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun86295(a0) { // fn#86295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:2177, offset: 0x01f8f65b, size: 151 bytes, params: 2, frame: 16
|
||||
const closure = UnreadSettingNoticeStore2Class;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'initialize', value: value_86297}, {key: 'getState', value: value_86298},
|
||||
{key: 'getLastActionTime', value: value_86299}, {key: 'maybeAutoUpgradeChannel', value: value_86300}]);
|
||||
}
|
||||
|
||||
function CONNECTION_OPEN_86302() { // fn#86302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:3731, offset: 0x01f8f997, size: 131 bytes, params: 1, frame: 15
|
||||
env0_21 = SelectedChannelStore.getChannelId();
|
||||
let Date = global.Date;
|
||||
env0_22 = Date.now();
|
||||
startInterval();
|
||||
Date = global.Date;
|
||||
const env0_0 = Date.now() - WEEK;
|
||||
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
defaultImport.forEach(env0_19.channels, _fun86303);
|
||||
}
|
||||
|
||||
function MESSAGE_CREATE_86304(a0) { // fn#86304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:3929, offset: 0x01f8fa46, size: 160 bytes, params: 2, frame: 14
|
||||
var orCreateChannelState_86292;
|
||||
var numSends;
|
||||
if (!a0.optimistic) {
|
||||
if (a0.isPushNotification) {
|
||||
return false;
|
||||
}
|
||||
var author = a0.message.author;
|
||||
var value = undefined;
|
||||
var id = author == null ? value : author.id;
|
||||
var getId = AuthenticationStore.getId;
|
||||
if (id !== Reflect.apply(getId, AuthenticationStore, [])) {
|
||||
return false;
|
||||
}
|
||||
if (shouldTrackChannel(a0.channelId)) {
|
||||
orCreateChannelState_86292 = getOrCreateChannelState_86292(a0.channelId);
|
||||
orCreateChannelState_86292.lastActionTime = global.Date.now();
|
||||
numSends = orCreateChannelState_86292.numSends;
|
||||
orCreateChannelState_86292.numSends = typeof numSends === 'bigint' ? numSends + 1n : +numSends + 1;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun86291() { // fn#86291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:1284, offset: 0x01f8f450, size: 32 bytes, params: 1, frame: 10
|
||||
if (trackChannel()) {
|
||||
env1_24.emitChange();
|
||||
}
|
||||
}
|
||||
|
||||
function value_86297(a0) { // fn#86297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:2557, offset: 0x01f8f6f2, size: 99 bytes, params: 2, frame: 19
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__;
|
||||
env1_19.channels = a0.channels;
|
||||
}
|
||||
this.syncWith([UserGuildSettingsStore], startInterval);
|
||||
this.waitFor(AuthenticationStore, ChannelStore, GuildStore, SelectedChannelStore, UserGuildSettingsStore);
|
||||
}
|
||||
|
||||
function value_86299(a0) { // fn#86299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:2736, offset: 0x01f8f755, size: 51 bytes, params: 2, frame: 4
|
||||
const value = environment.__proto__;
|
||||
return env1_19.channels[a0]?.lastActionTime ?? 0;
|
||||
}
|
||||
|
||||
function value_86300(a0) { // fn#86300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:2864, offset: 0x01f8f788, size: 473 bytes, params: 2, frame: 25
|
||||
var r0;
|
||||
var joinedAt;
|
||||
var r9;
|
||||
var r8;
|
||||
var r4;
|
||||
var r1;
|
||||
var basicChannel;
|
||||
var value4;
|
||||
var guild_id;
|
||||
var value5;
|
||||
var getGuild;
|
||||
var value6;
|
||||
var Date;
|
||||
var prototype;
|
||||
var value7;
|
||||
var date;
|
||||
var value8;
|
||||
var defaultImport;
|
||||
var age;
|
||||
var id;
|
||||
var value9;
|
||||
var now;
|
||||
var value10;
|
||||
var getTime;
|
||||
var value11;
|
||||
var Math;
|
||||
var min;
|
||||
var value12;
|
||||
var channels;
|
||||
var property;
|
||||
var value13;
|
||||
var lastActionTime;
|
||||
var value14;
|
||||
var binding;
|
||||
var length;
|
||||
var value15;
|
||||
var property2;
|
||||
var timeSinceJoin;
|
||||
var numSends;
|
||||
var sends;
|
||||
var value16;
|
||||
var viewDuration;
|
||||
var viewTime;
|
||||
var value17;
|
||||
var value18;
|
||||
var add;
|
||||
var moduleValue;
|
||||
var updateChannelUnreadSetting;
|
||||
var ALL_MESSAGES;
|
||||
let value = environment.__proto__;
|
||||
if (shouldTrackChannel(a0)) {
|
||||
basicChannel = ChannelStore.getBasicChannel(a0);
|
||||
value4 = basicChannel != null;
|
||||
reducibleJoin4: while (true) {
|
||||
if (value4) {
|
||||
guild_id = basicChannel.guild_id;
|
||||
value5 = guild_id != null;
|
||||
r0 = value5;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r0 = value4;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
reducibleJoin19: while (true) {
|
||||
if (r0) {
|
||||
getGuild = GuildStore.getGuild;
|
||||
guild_id = basicChannel.guild_id;
|
||||
value6 = Reflect.apply(getGuild, GuildStore, [guild_id]);
|
||||
reducibleJoin7: while (true) {
|
||||
if (value6 == null) {
|
||||
joinedAt = undefined;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
joinedAt = value6.joinedAt;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
reducibleJoin9: while (true) {
|
||||
if (joinedAt != null) {
|
||||
r9 = joinedAt;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value7 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value8 = date instanceof Object ? date : value7;
|
||||
r9 = value8;
|
||||
break reducibleJoin9;
|
||||
}
|
||||
defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
age = defaultImport.age;
|
||||
id = basicChannel.id;
|
||||
value9 = Reflect.apply(age, defaultImport, [id]);
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value10 = Reflect.apply(now, Date, []);
|
||||
getTime = r9.getTime;
|
||||
value11 = value10 - Reflect.apply(getTime, r9, []);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value12 = Reflect.apply(min, Math, [value9, value11]);
|
||||
channels = env1_19.channels;
|
||||
id = basicChannel.id;
|
||||
property = channels[id];
|
||||
value13 = false;
|
||||
reducibleJoin16: while (true) {
|
||||
if (property == null) {
|
||||
r4 = value13;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
lastActionTime = property.lastActionTime;
|
||||
Date = global.Date;
|
||||
now = Date.now;
|
||||
value14 = Reflect.apply(now, Date, []);
|
||||
if (lastActionTime < value14 - WEEK) {
|
||||
r4 = value13;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
binding = env1_16;
|
||||
length = binding.length;
|
||||
value15 = 0;
|
||||
if (!(value15 < length)) {
|
||||
r4 = value13;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
r8 = value15;
|
||||
reducibleLoop12: while (true) {
|
||||
property2 = binding[r8];
|
||||
timeSinceJoin = property2.timeSinceJoin;
|
||||
if (value12 < timeSinceJoin) {
|
||||
numSends = property.numSends;
|
||||
sends = property2.sends;
|
||||
value16 = true;
|
||||
reducibleJoin15: while (true) {
|
||||
reducibleJoin19: while (true) {
|
||||
if (numSends >= sends) {
|
||||
r4 = value16;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
viewDuration = property.viewDuration;
|
||||
viewTime = property2.viewTime;
|
||||
if (viewDuration >= viewTime) {
|
||||
r4 = value16;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
break reducibleJoin15;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
}
|
||||
value17 = typeof r8 === 'bigint' ? r8 + 1n : +r8 + 1;
|
||||
length = binding.length;
|
||||
if (value17 < length) {
|
||||
r8 = value17;
|
||||
continue reducibleLoop12;
|
||||
}
|
||||
r4 = value13;
|
||||
break reducibleJoin16;
|
||||
}
|
||||
}
|
||||
value18 = !!r4;
|
||||
reducibleJoin18: while (true) {
|
||||
if (r4) {
|
||||
channels = env1_19.channels;
|
||||
delete channels[a0];
|
||||
binding = env1_20;
|
||||
add = binding.add;
|
||||
Reflect.apply(add, binding, [a0]);
|
||||
moduleValue = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
|
||||
updateChannelUnreadSetting = moduleValue.updateChannelUnreadSetting;
|
||||
guild_id = basicChannel.guild_id;
|
||||
id = basicChannel.id;
|
||||
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
|
||||
Reflect.apply(updateChannelUnreadSetting, moduleValue, [guild_id, id, ALL_MESSAGES]);
|
||||
value = true;
|
||||
r1 = value;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
r1 = value18;
|
||||
break reducibleJoin18;
|
||||
}
|
||||
r0 = r1;
|
||||
break reducibleJoin19;
|
||||
}
|
||||
break reducibleJoin19;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun86303({lastActionTime}, a1) { // fn#86303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11497:3859, offset: 0x01f8fa1a, size: 44 bytes, params: 3, frame: 2
|
||||
if (lastActionTime < env0_0) {
|
||||
value = environment.__proto__;
|
||||
delete env1_19.channels[a1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/* Metro module 11314; source: modules/notifications/settings_unread_notice/native/UnreadSettingNotice.tsx; dependencies: [31, 27, 670, 33, 4501, 697, 11315, 4573, 1244, 5278, 11316, 2] */
|
||||
function _fun86319(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11500:6, offset: 0x01f908fb, size: 416 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_4 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {'display': 'flex', 'flexDirection': 'row', 'paddingVertical': null, 'paddingHorizontal': null,
|
||||
'borderBottomWidth': 1};
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
object.paddingVertical = PX_12;
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object.borderBottomColor = BORDER_SUBTLE;
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.backgroundColor = BACKGROUND_BASE_LOW;
|
||||
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
|
||||
copyDataProperties(object, SHADOW_LOW, undefined);
|
||||
const env0_7 = Reflect.apply(createStyles, value, [{content: object, informations: {flex: 1},
|
||||
actions: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'marginLeft': 16},
|
||||
inlineTextWithIcon: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings_unread_notice/native/UnreadSettingNotice.tsx');
|
||||
exports.default = UnreadSettingNoticeConnected;
|
||||
}
|
||||
|
||||
function UnreadSettingNoticeConnected(a0) { // fn#86320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11500:779, offset: 0x01f90a9b, size: 392 bytes, params: 2, frame: 27
|
||||
const env0_0 = a0;
|
||||
const styles = useStyles();
|
||||
const items2 = [((Component) => <Component id={a0.channel.id} />)(importDefault(11315) /* metro dependency 11315: UnreadSettingNoticeImpressionTracking */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
items2[1] = <View style={styles.informations}><Text variant="text-md/semibold">{Reflect.apply(string, intl,
|
||||
[(require(1244) /* metro dependency 1244: indexNative */).t.i4xQ5o])}</Text></View>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const pressableOpacityProps = {accessibilityRole: 'button', style: styles.inlineTextWithIcon,
|
||||
onPress: onPress_86321};
|
||||
string = intl.string;
|
||||
const KyUKhT = (require(1244) /* metro dependency 1244: indexNative */).t.KyUKhT;
|
||||
items2[2] = <View style={styles.actions}><PressableOpacity {...pressableOpacityProps}><Text variant="text-xs/medium" color="text-link">{Reflect.apply(string,
|
||||
intl, [KyUKhT])}</Text></PressableOpacity></View>;
|
||||
return (
|
||||
<View style={styles.content}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function UnreadSettingNoticeConnectedOnPress() { // fn#86321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11500:1146, owner: UnreadSettingNoticeConnected.onPress, offset: 0x01f90c23, size: 81 bytes, params: 1, frame: 16
|
||||
const defaultImport = importDefault(11316) /* metro dependency 11316: updateChannelUnreadSettings */;
|
||||
const binding = env0_0;
|
||||
const guild_id = binding.channel.guild_id;
|
||||
const id = binding.channel.id;
|
||||
const UNREADS_ONLY_MENTIONS = ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS;
|
||||
defaultImport(guild_id, id, UNREADS_ONLY_MENTIONS);
|
||||
binding.clearUnreadsNotice();
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/* Metro module 11316; source: modules/notifications/settings_unread_notice/utils/updateChannelUnreadSettings.tsx; dependencies: [4864, 661, 4865, 670, 6613, 10942, 6610, 2] */
|
||||
function _fun86324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11502:6, offset: 0x01f90d49, size: 184 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
const env0_5 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
||||
const env0_6 = (require(670) /* metro dependency 670: UserSettingsConstants */).ChannelNotificationSettingsFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings_unread_notice/utils/updateChannelUnreadSettings.tsx');
|
||||
exports.default = updateChannelUnreadSettings;
|
||||
}
|
||||
|
||||
function updateChannelUnreadSettings(a0, a1, a2) { // fn#86325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11502:326, offset: 0x01f90e01, size: 193 bytes, params: 4, frame: 26
|
||||
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
||||
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
|
||||
const object2 = {};
|
||||
const notificationSettingsFlagUtilsModule = require(10942) /* metro dependency 10942: notificationSettingsFlagUtils */;
|
||||
const withChannelUnreadFlags = notificationSettingsFlagUtilsModule.withChannelUnreadFlags;
|
||||
const getChannelIdFlags = UserGuildSettingsStore.getChannelIdFlags;
|
||||
object2.flags = Reflect.apply(withChannelUnreadFlags, notificationSettingsFlagUtilsModule,
|
||||
[Reflect.apply(getChannelIdFlags, UserGuildSettingsStore, [a0, a1]), a2]);
|
||||
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
|
||||
const unreads = NotificationLabel.unreads;
|
||||
const UNREADS_ALL_MESSAGES = ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES;
|
||||
const value2 = Reflect.apply(unreads, NotificationLabel,
|
||||
[a2 === UNREADS_ALL_MESSAGES ? UnreadSetting.ALL_MESSAGES : UnreadSetting.ONLY_MENTIONS]);
|
||||
const NOTIFICATION_SETTING_UNREAD_NOTICE = AnalyticsObjects.NOTIFICATION_SETTING_UNREAD_NOTICE;
|
||||
Reflect.apply(updateChannelOverrideSettings, defaultImport, [a0, a1, object2, value2,
|
||||
{object: NOTIFICATION_SETTING_UNREAD_NOTICE}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/* Metro module 11310; source: modules/notifications/settings_unread_notice/utils/useUnreadSettingNotice.tsx; dependencies: [57, 31, 1383, 10939, 566, 11311, 2] */
|
||||
function _fun86279(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:6, offset: 0x01f8ec91, size: 159 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(1383) /* metro dependency 1383: ChannelRecord */).CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings_unread_notice/utils/useUnreadSettingNotice.tsx');
|
||||
exports.default = useUnreadSettingNotice;
|
||||
}
|
||||
|
||||
function useUnreadSettingNotice(a0) { // fn#86280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:283, offset: 0x01f8ed30, size: 275 bytes, params: 2, frame: 21
|
||||
const env0_0 = a0;
|
||||
const value2 = (require(10939) /* metro dependency 10939: NotificationUtils */).useShouldUseNewNotificationSystem('useShouldRenderBanner');
|
||||
const binding = env0_4;
|
||||
const [property, env0_3] = env0_3Binding(binding.useState(''), 2);
|
||||
binding.useEffect(_fun86281, [a0.id]);
|
||||
binding.useEffect(_fun86283, [property, value2,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStores([importDefault(11311) /* metro dependency 11311: UnreadSettingNoticeStore2 */],
|
||||
_fun86282), a0]);
|
||||
return {showUnreadsNotice: property === a0.id, clearUnreadsNotice: binding.useCallback(_fun86284, [])};
|
||||
}
|
||||
|
||||
function _fun86281() { // fn#86281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:444, offset: 0x01f8ee43, size: 20 bytes, params: 1, frame: 11
|
||||
env0_3('');
|
||||
}
|
||||
|
||||
function _fun86282() { // fn#86282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:509, offset: 0x01f8ee57, size: 52 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(11311) /* metro dependency 11311: UnreadSettingNoticeStore2 */).getLastActionTime(env0_0.id);
|
||||
}
|
||||
|
||||
function _fun86283() { // fn#86283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:560, offset: 0x01f8ee8b, size: 130 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
let r1 = CHANNEL_ELIGIBLE_FOR_UNREAD_SETTING.has(env0_0.type) && env0_2 !== env0_0.id && env0_1;
|
||||
if (r1) {
|
||||
value = importDefault(11311) /* metro dependency 11311: UnreadSettingNoticeStore2 */;
|
||||
value = value.maybeAutoUpgradeChannel(env0_0.id);
|
||||
r1 = value;
|
||||
}
|
||||
if (r1) {
|
||||
env0_3(env0_0.id);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun86284() { // fn#86284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11496:674, offset: 0x01f8ef0d, size: 20 bytes, params: 1, frame: 11
|
||||
return env0_3('');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user