44 lines
3.4 KiB
TypeScript
44 lines
3.4 KiB
TypeScript
/* Metro module 6979; source: modules/soundboard/trackSoundPlayed.tsx; dependencies: [4266, 1379, 4294, 1934, 4614, 661, 1880, 683, 2] */
|
|
function _fun55358(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7157:6, offset: 0x013a4468, size: 236 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
|
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
|
const env0_6 = (require(4614) /* metro dependency 4614: SoundboardConstants */).DEFAULT_SOUND_GUILD_ID;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
|
|
const env0_8 = premiumConstantsModule.AnalyticsPremiumFeatureNames;
|
|
const env0_9 = premiumConstantsModule.AnalyticsPremiumFeatureTiers;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/trackSoundPlayed.tsx');
|
|
exports.default = trackSoundPlayed;
|
|
}
|
|
|
|
function trackSoundPlayed(a0, a1, a2, a3, a4) { // fn#55359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7157:353, offset: 0x013a4554, size: 387 bytes, params: 6, frame: 25
|
|
const getChannel = ChannelStore.getChannel;
|
|
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
|
|
const value2 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getVoiceChannelId, SelectedChannelStore, [])]);
|
|
const value3 = null;
|
|
const value4 = undefined;
|
|
const r12 = value3 == value2 ? value4 : value2.getGuildId();
|
|
const mediaSessionId = RTCConnectionStore.getMediaSessionId();
|
|
const rTCConnectionId = RTCConnectionStore.getRTCConnectionId();
|
|
const currentGameForAnalytics = RunningGameStoreNative.getCurrentGameForAnalytics();
|
|
const name = value3 == currentGameForAnalytics ? value4 : currentGameForAnalytics.name;
|
|
let r13 = r12 !== a2.guildId && a2.guildId !== DEFAULT_SOUND_GUILD_ID;
|
|
const r8 = a2.guildId === DEFAULT_SOUND_GUILD_ID ? 'default' : r13 ? 'custom-external' : 'custom';
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const PREMIUM_FEATURE_USAGE = AnalyticEvents.PREMIUM_FEATURE_USAGE;
|
|
const SOUNDBOARD_PLAY = AnalyticsPremiumFeatureNames.SOUNDBOARD_PLAY;
|
|
r13 = r13 ? AnalyticsPremiumFeatureTiers.PREMIUM_STANDARD : AnalyticsPremiumFeatureTiers.FREE;
|
|
Reflect.apply(track, defaultImport, [PREMIUM_FEATURE_USAGE, {feature_name: SOUNDBOARD_PLAY, feature_tier: r13,
|
|
guild_id: r12, home_guild_id: a2.guildId, location_stack: a0, rtc_connection_id: rTCConnectionId,
|
|
media_session_id: mediaSessionId, in_overlay: a1, application_name: name,
|
|
emoji_count: value3 != a2.emojiId || value3 != a2.emojiName ? 1 : 0, feature_selection: r8,
|
|
feature_selection_id: a2.soundId, sound_type: a3, sequence_number: value3 != a4 ? a4 + 1 : value3}]);
|
|
return value4;
|
|
}
|
|
|