83 lines
5.5 KiB
TypeScript
83 lines
5.5 KiB
TypeScript
/* Metro module 7677; source: modules/premium/gifting/PremiumGiftingIntentActionCreators.tsx; dependencies: [1226, 661, 507, 694, 2] */
|
|
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as HTTPUtilsModule from '../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun61337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:6, offset: 0x01b3bb64, size: 203 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/gifting/PremiumGiftingIntentActionCreators.tsx');
|
|
exports.fetchAndReconcileGiftIntentDismissals = fetchAndReconcileGiftIntentDismissals;
|
|
exports.logFriendsListGiftIntentsShown = logFriendsListGiftIntentsShown;
|
|
exports.logMessageGiftIntentShown = logMessageGiftIntentShown;
|
|
exports.logGiftIntentFlowPurchasedGift = logGiftIntentFlowPurchasedGift;
|
|
exports.logGiftIntentUnreadNotificationDismiss = logGiftIntentUnreadNotificationDismiss;
|
|
exports.logProfilePopoutGiftIntentsDismiss = logProfilePopoutGiftIntentsDismiss;
|
|
function fetchAndReconcileGiftIntentDismissals(a0) { // fn#61338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:262, offset: 0x01b3bc2f, size: 116 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
const env0_1 = AuthenticationStore.getId();
|
|
const HTTP = (HTTPUtilsModule).HTTP;
|
|
const get = HTTP.get;
|
|
const GIFT_INTENT_DISMISSALS = Endpoints.GIFT_INTENT_DISMISSALS;
|
|
return Reflect.apply(get, HTTP, [{'url': null, 'oldFormErrors': true, 'rejectWithError': true,
|
|
url: GIFT_INTENT_DISMISSALS}]).then(_fun61339, _fun61341);
|
|
function _fun61339(a0) { // fn#61339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:426, offset: 0x01b3bca3, size: 177 bytes, params: 2, frame: 15
|
|
var environment;
|
|
var dispatch;
|
|
var object;
|
|
let value = environment.__proto__;
|
|
if (AuthenticationStore.getId() === env0_1) {
|
|
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
dispatch = value.dispatch;
|
|
object = {type: 'GIFT_INTENT_DISMISSALS_FETCH_SUCCESS'};
|
|
object.dismissals = (a0.body.dismissals ?? []).map(function(a0) {
|
|
var object = {targetId: a0.target_id};
|
|
var Number = global.Number;
|
|
object.dismissedAtMs = Number(a0.dismissed_at_ms);
|
|
return object;
|
|
});
|
|
object.settingsTimestampMs = env0_0;
|
|
Reflect.apply(dispatch, value, [object]);
|
|
} else {
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'GIFT_INTENT_DISMISSALS_FETCH_FAILURE'});
|
|
}
|
|
}
|
|
|
|
function _fun61341() { // fn#61341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:724, offset: 0x01b3bd82, size: 49 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(Dispatcher).dispatch({type: 'GIFT_INTENT_DISMISSALS_FETCH_FAILURE'});
|
|
}
|
|
|
|
}
|
|
|
|
function logFriendsListGiftIntentsShown() { // fn#61342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:830, offset: 0x01b3bdb3, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'FRIENDS_LIST_GIFT_INTENTS_SHOWN'});
|
|
}
|
|
|
|
function logMessageGiftIntentShown(a0) { // fn#61343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:960, offset: 0x01b3bde4, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'MESSAGE_GIFT_INTENT_SHOWN',
|
|
recipientUserId: a0});
|
|
}
|
|
|
|
function logGiftIntentFlowPurchasedGift(a0) { // fn#61344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:1103, offset: 0x01b3be1d, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'GIFT_INTENT_FLOW_PURCHASED_GIFT',
|
|
recipientUserId: a0});
|
|
}
|
|
|
|
function logGiftIntentUnreadNotificationDismiss() { // fn#61345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:1265, offset: 0x01b3be56, size: 49 bytes, params: 1, frame: 13
|
|
(Dispatcher).dispatch({type: 'GIFT_UNREAD_NOTIFICATION_DISMISS'});
|
|
}
|
|
|
|
function logProfilePopoutGiftIntentsDismiss(a0) { // fn#61346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7855:1413, offset: 0x01b3be87, size: 57 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'PROFILE_POPOUT_GIFT_INTENTS_DISMISS',
|
|
recipientUserId: a0});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun61337, 7677, [1226, 661, 507, 694,
|
|
2]) /* metro module 7677, dependencies: [1226, 661, 507, 694, 2] */;
|