115 lines
6.8 KiB
TypeScript
115 lines
6.8 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] */
|
|
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});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
const constantsModule = require(9906) /* metro dependency 9906: Constants */;
|
|
const env0_5 = constantsModule.FeedbackCategory;
|
|
const env0_6 = constantsModule.FeedbackType;
|
|
const env0_7 = constantsModule.StreamFeedbackOption;
|
|
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
|
(require(2) /* metro dependency 2 */).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 object4;
|
|
const env0_2 = (require(7128) /* metro dependency 7128: StreamerApplicationSelectors */).useGetStreamApplication(stream);
|
|
const value2 = (require(566) /* metro dependency 566: flux */).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]);
|
|
object4 = {};
|
|
object4.value = value2 ? FeedbackCategory.STREAMING : FeedbackCategory.STREAM_WATCHING;
|
|
string = intl.string;
|
|
const defaultImport = importDefault(2454) /* metro dependency 2454: FeedbackMessages */;
|
|
object4.label = Reflect.apply(string, intl, [value2 ? defaultImport['0ZBLiZ'] : defaultImport.TVTIT1]);
|
|
object4.problemsHeader = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Y1t5P']);
|
|
object4.problemOptions = (require(9909) /* metro dependency 9909: FeedbackUtils */).getStreamFeedbackOptions({isStreamer: value2});
|
|
const object2 = {};
|
|
const FREEFORM = StreamFeedbackOption.FREEFORM;
|
|
object2.value = FREEFORM;
|
|
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.emlT91);
|
|
object4.freeformConfig = object2;
|
|
return ((Component) => <Component headerLabel={value3} showHeaderCloseButton ratingBody={value2 ? value4 : value5} categoriesHeader={intl.string(defaultImport.tq8598)} optionsTree={[object4]} trackOpen={trackOpen_120501} trackReport={trackReport} />)(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 = importDefault(683) /* metro dependency 683: 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 object2;
|
|
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]);
|
|
object2 = {category: category};
|
|
r9 = value == reason ? value3 : reason.value;
|
|
r0 = value != r9 ? r9 : value;
|
|
object2.problem = r0;
|
|
variant = value == reason ? value3 : reason.variant;
|
|
r0 = value != variant ? variant : value;
|
|
object2.variant = r0;
|
|
object2.stream = stream;
|
|
r9 = value != feedback ? feedback : '';
|
|
object2.feedback = r9;
|
|
object2.streamApplication = env0_2;
|
|
object2.analyticsData = analyticsData;
|
|
object2.location = 'Stream End';
|
|
object2.rating = rating;
|
|
defaultImport(object2);
|
|
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();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|