204 lines
7.3 KiB
TypeScript
204 lines
7.3 KiB
TypeScript
/* Metro module 14472; source: modules/channel/usePrivateChannelWave.native.tsx; dependencies: [5, 57, 31, 661, 4503, 11786, 1230, 7067, 3857, 1244, 11785, 14473, 2] */
|
|
function _fun109509(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:6, offset: 0x0234fb19, size: 207 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importAll(31) /* metro dependency 31 */;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_6 = constantsModule.ME;
|
|
const env0_7 = constantsModule.Routes;
|
|
const env0_8 = (require(4503) /* metro dependency 4503: MessageConstants */).MessageSendLocation;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/channel/usePrivateChannelWave.native.tsx');
|
|
exports.default = usePrivateChannelWave;
|
|
}
|
|
|
|
function usePrivateChannelWave(a0, a1) { // fn#109510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:277, offset: 0x0234fbe8, size: 157 bytes, params: 3, frame: 18
|
|
var object2;
|
|
const env0_0 = a0;
|
|
const binding = env0_5;
|
|
const [property, env0_2] = env0_4(binding.useState(false), 2);
|
|
const value5 = binding.useCallback(env0_3(_fun109512), [a0.id, property]);
|
|
object2 = {};
|
|
object2.waveShouldShow = (require(14473) /* metro dependency 14473: usePrivateChannelWaveEligible */).usePrivateChannelWaveEligible(a0,
|
|
a1);
|
|
object2.wavePressed = value5;
|
|
return object2;
|
|
}
|
|
|
|
function* _fun109512() { // fn#109512, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14669:376, offset: 0x0234fc90, size: 404 bytes, params: 1, frame: 23
|
|
var r2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var value4;
|
|
var trackWaveCtaClicked;
|
|
var object2;
|
|
var id;
|
|
var value5;
|
|
var transitionTo;
|
|
var CHANNEL;
|
|
var binding3;
|
|
var binding4;
|
|
var property;
|
|
var value6;
|
|
var sendStickers;
|
|
var SEND_WAVE;
|
|
var items2;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var error;
|
|
var ok;
|
|
var status;
|
|
var value10;
|
|
var binding5;
|
|
var value11;
|
|
var open;
|
|
var binding6;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
var Whhv4w;
|
|
if (true) {
|
|
value = environment.__proto__;
|
|
if (!importDefault) {
|
|
dependencyMap(true);
|
|
value3 = environment.__proto__.__proto__;
|
|
binding = env2_0;
|
|
binding2 = env2_2;
|
|
value4 = binding(binding2[5]);
|
|
trackWaveCtaClicked = value4.trackWaveCtaClicked;
|
|
object2 = {};
|
|
id = require.id;
|
|
object2.channelId = id;
|
|
object2.source = 'Messages Tab';
|
|
Reflect.apply(trackWaveCtaClicked, value4, [object2]);
|
|
value5 = binding(binding2[6]);
|
|
transitionTo = value5.transitionTo;
|
|
binding = env2_7;
|
|
CHANNEL = binding.CHANNEL;
|
|
binding3 = env2_6;
|
|
id = require.id;
|
|
Reflect.apply(transitionTo, value5, [Reflect.apply(CHANNEL, binding, [binding3, id])]);
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort26: while (true) {
|
|
exceptionLanding22: while (true) {
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
ok = error.ok;
|
|
reducibleJoin24: while (true) {
|
|
if (ok) {
|
|
r2 = ok;
|
|
break reducibleJoin24;
|
|
}
|
|
status = error.status;
|
|
value10 = status !== 429;
|
|
r2 = value10;
|
|
break reducibleJoin24;
|
|
}
|
|
reducibleJoin26: while (true) {
|
|
if (r2) {
|
|
break reducibleJoin26;
|
|
}
|
|
binding = env2_1;
|
|
binding5 = env2_2;
|
|
value11 = binding(binding5[8]);
|
|
open = value11.open;
|
|
object2 = {key: 'HANDLE_WAVE_PRESS_TOAST'};
|
|
binding6 = env2_0;
|
|
intl = binding6(binding5[9]).intl;
|
|
string = intl.string;
|
|
t = binding6(binding5[9]).t;
|
|
Whhv4w = t.Whhv4w;
|
|
object2.content = Reflect.apply(string, intl, [Whhv4w]);
|
|
object2.icon = binding(binding5[10]);
|
|
Reflect.apply(open, value11, [object2]);
|
|
break reducibleJoin26;
|
|
}
|
|
break reduciblePort26;
|
|
}
|
|
dependencyMap(false);
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding4 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
property = binding4[7];
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
sendStickers = value6.sendStickers;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
id = require.id;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
SEND_WAVE = binding.SEND_WAVE;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
object2.location = SEND_WAVE;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
items2 = ['749054660769218631'];
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
try {
|
|
value7 = Reflect.apply(sendStickers, value6, [id, items2, '', object2]);
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
yield value7;
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
break exceptionLanding22;
|
|
}
|
|
if (value9) {
|
|
return value8;
|
|
}
|
|
dependencyMap(false);
|
|
}
|
|
}
|
|
}
|
|
|