126 lines
8.3 KiB
TypeScript
126 lines
8.3 KiB
TypeScript
/* Metro module 15698; source: components_native/calls/stream/StreamFeedbackActionSheet.tsx; dependencies: [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080, 15701, 1962, 3856, 2] */
|
|
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import FeedbackMessages from '../../../modules/feedback/intl/Feedback.messages.js'; /* Metro dependency 2454 */
|
|
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as StreamerApplicationSelectorsModule from '../../../modules/go_live/utils/StreamerApplicationSelectors.tsx'; /* Metro dependency 7128 */
|
|
import * as ConstantsModule2 from '../../../modules/feedback/Constants.tsx'; /* Metro dependency 9906 */
|
|
|
|
function _fun120498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:6, offset: 0x0252c980, size: 218 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const constantsModule = ConstantsModule2;
|
|
const env0_5 = constantsModule.FeedbackCategory;
|
|
const env0_6 = constantsModule.FeedbackType;
|
|
const env0_7 = constantsModule.StreamFeedbackOption;
|
|
(FileImportTrackerModule).fileFinishedImporting('components_native/calls/stream/StreamFeedbackActionSheet.tsx');
|
|
exports.default = StreamFeedbackActionSheet;
|
|
function StreamFeedbackActionSheet({stream, analyticsData}) { // fn#120499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:331, offset: 0x0252ca5a, size: 661 bytes, params: 2, frame: 25
|
|
var object3;
|
|
const env0_2 = (StreamerApplicationSelectorsModule).useGetStreamApplication(stream);
|
|
const value2 = (FluxModule).useStateFromStores([AuthenticationStore], _fun120500);
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const value3 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['5smP3R']]);
|
|
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0uxA2V']);
|
|
string = intl.string;
|
|
const CqjnLN = (require(1244) /* metro dependency 1244: indexNative */).t.CqjnLN;
|
|
const value5 = Reflect.apply(string, intl, [CqjnLN]);
|
|
object3 = {};
|
|
object3.value = value2 ? FeedbackCategory.STREAMING : FeedbackCategory.STREAM_WATCHING;
|
|
string = intl.string;
|
|
const defaultImport = FeedbackMessages;
|
|
object3.label = Reflect.apply(string, intl, [value2 ? defaultImport['0ZBLiZ'] : defaultImport.TVTIT1]);
|
|
object3.problemsHeader = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Y1t5P']);
|
|
object3.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getStreamFeedbackOptions({isStreamer: value2});
|
|
const object = {};
|
|
const FREEFORM = StreamFeedbackOption.FREEFORM;
|
|
object.value = FREEFORM;
|
|
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
|
|
object3.freeformConfig = object;
|
|
return ((Component) => <Component headerLabel={value3} showHeaderCloseButton ratingBody={value2 ? value4 : value5} categoriesHeader={intl.string(defaultImport.tq8598)} optionsTree={[object3]} trackOpen={trackOpen_120501} trackReport={trackReport_120502} />)(importDefault(15699) /* metro dependency 15699: FeedbackActionSheetV2 */);
|
|
function _fun120500() { // fn#120500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:469, offset: 0x0252ccef, size: 36 bytes, params: 1, frame: 9
|
|
const value = environment.__proto__;
|
|
return AuthenticationStore.getId() === stream.ownerId;
|
|
}
|
|
|
|
function StreamFeedbackActionSheetTrackOpen() { // fn#120501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1079, owner: StreamFeedbackActionSheet.trackOpen, offset: 0x0252cd13, size: 161 bytes, params: 1, frame: 18
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
|
|
const value2 = null;
|
|
Reflect.apply(track, defaultImport, [OPEN_POPOUT, {type: 'Stream Feedback Sheet', other_user_id: stream.ownerId,
|
|
application_id: value2 != env0_2 ? env0_2.id : value2,
|
|
application_name: value2 != env0_2 ? env0_2.name : value2, game_id: value2 != env0_2 ? env0_2.id : value2}]);
|
|
}
|
|
|
|
function StreamFeedbackActionSheetTrackReport({dontShowAgain, rating, category, reason, feedback}) { // fn#120502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15906:1278, owner: StreamFeedbackActionSheet.trackReport, offset: 0x0252cdb4, size: 445 bytes, params: 2, frame: 22
|
|
var r9;
|
|
var r0;
|
|
var variant;
|
|
var value;
|
|
var object;
|
|
var value2;
|
|
var value3;
|
|
var defaultImport;
|
|
var analyticsDataBinding;
|
|
var openLazy;
|
|
var value7;
|
|
if (dontShowAgain) {
|
|
value = environment.__proto__;
|
|
require(dependencyMap[9]).processOptOut({feedbackType: FeedbackType.STREAM,
|
|
location: 'StreamFeedbackActionSheet'});
|
|
}
|
|
value = null;
|
|
if (value != rating) {
|
|
value2 = environment.__proto__;
|
|
value3 = undefined;
|
|
defaultImport = importDefault(dependencyMap[12]);
|
|
object = {category: category};
|
|
r9 = value == reason ? value3 : reason.value;
|
|
r0 = value != r9 ? r9 : value;
|
|
object.problem = r0;
|
|
variant = value == reason ? value3 : reason.variant;
|
|
r0 = value != variant ? variant : value;
|
|
object.variant = r0;
|
|
object.stream = stream;
|
|
r9 = value != feedback ? feedback : '';
|
|
object.feedback = r9;
|
|
object.streamApplication = env0_2;
|
|
object.analyticsData = analyticsData;
|
|
object.location = 'Stream End';
|
|
object.rating = rating;
|
|
defaultImport(object);
|
|
if (value == reason) {
|
|
require(dependencyMap[17]).presentFeedbackSent();
|
|
} else {
|
|
value = require(dependencyMap[13]);
|
|
if (value.shouldShowLogUploadForCategory(rating, category, reason)) {
|
|
value = importDefault(dependencyMap[14]);
|
|
openLazy = value.openLazy;
|
|
value7 = require(dependencyMap[16])(dependencyMap[15], dependencyMap.paths);
|
|
analyticsDataBinding = analyticsData;
|
|
Reflect.apply(openLazy, value, [value7, 'UploadLogs',
|
|
{mediaSessionId: analyticsDataBinding.media_session_id,
|
|
rtcConnectionId: analyticsDataBinding.rtc_connection_id}]);
|
|
} else {
|
|
require(dependencyMap[17]).presentFeedbackSent();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun120498, 15698, [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080,
|
|
15701, 1962, 3856,
|
|
2]) /* metro module 15698, dependencies: [31, 1226, 661, 9906, 33, 7128, 566, 1244, 2454, 9909, 15699, 683, 15559, 15700, 4080, 15701, 1962, 3856, 2] */;
|