113 lines
7.1 KiB
TypeScript
113 lines
7.1 KiB
TypeScript
/* Metro module 9862; source: modules/links/native/showLongPressURLActionSheet.tsx; dependencies: [4081, 1244, 3856, 6797, 3853, 9212, 9863, 6802, 2] */
|
|
import HandleContentLinking from './handleContentLinking.tsx'; /* Metro dependency 9863 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
|
|
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
|
|
import * as ShowShareActionSheetAndroidModule from '../../action_sheet/native/showShareActionSheet.android.tsx'; /* Metro dependency 9212 */
|
|
|
|
function _fun77304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:6, offset: 0x01df8a92, size: 103 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/links/native/showLongPressURLActionSheet.tsx');
|
|
exports.default = showLongPressURLActionSheet;
|
|
function showLongPressURLActionSheet({urlString, guildId, channelId, messageId, disableHapticFeedback}) { // fn#77305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:188, offset: 0x01df8af9, size: 825 bytes, params: 2, frame: 26
|
|
var r15;
|
|
var r10;
|
|
var value;
|
|
var push;
|
|
const intl = (IndexNativeModule).intl;
|
|
var string;
|
|
const t = (IndexNativeModule).t;
|
|
var object;
|
|
disableHapticFeedback = !(disableHapticFeedback === undefined) && disableHapticFeedback;
|
|
if (!disableHapticFeedback) {
|
|
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
|
value.triggerHapticFeedback((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_LIGHT);
|
|
}
|
|
const items2 = [];
|
|
value = urlString.match(RegExp('^(tel|sms|mailto):([^?;]+)', ''));
|
|
if (value != null) {
|
|
push = items2.push;
|
|
string = intl.string;
|
|
if (value[1] === 'mailto') {
|
|
r10 = t.ZYLVKo;
|
|
r15 = require;
|
|
} else {
|
|
r10 = t['3zozoR'];
|
|
}
|
|
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [r10]), onPress: onPress_77306}]);
|
|
if (value[1] === 'tel') {
|
|
push = items2.push;
|
|
object = {};
|
|
object.label = intl.string(t['+wbjMW']);
|
|
object.onPress = onPress_77307;
|
|
Reflect.apply(push, items2, [object]);
|
|
}
|
|
}
|
|
const items3 = [{label: intl.string(t.wuRE8M), onPress: onPress_77308}];
|
|
string = intl.string;
|
|
const WqhZss = t.WqhZss;
|
|
items3[1] = {label: Reflect.apply(string, intl, [WqhZss]), onPress: onPress_77309};
|
|
const value3 = arraySpread(items3, items2, 2, r15);
|
|
string = intl.string;
|
|
const Ej3B3Y = t.Ej3B3Y;
|
|
items3[value3] = {label: Reflect.apply(string, intl, [Ej3B3Y]), onPress: onPress_77310};
|
|
value3 + 1;
|
|
if (channelId != null) {
|
|
items3.unshift({label: intl.string(t.aW2YlJ), onPress: onPress_77311});
|
|
}
|
|
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
|
|
const showSimpleActionSheet = value.showSimpleActionSheet;
|
|
const object3 = {};
|
|
object3.title = intl.string(t['5oIOLX']);
|
|
object3.subtitle = urlString;
|
|
Reflect.apply(showSimpleActionSheet, value, [{key: 'LongPressUrl', header: object3, options: items3,
|
|
hasIcons: false}]);
|
|
function showLongPressURLActionSheetOnPress() { // fn#77306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:523, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8e32, size: 71 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(ToastUtilsModule).presentLinkCopied();
|
|
(ClipboardUtilsNativeModule).copy(env0_4[2]);
|
|
}
|
|
|
|
function showLongPressURLActionSheetOnPress_77307() { // fn#77307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:652, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8e79, size: 68 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
const openURL = value.openURL;
|
|
const urlStringBinding = urlString;
|
|
Reflect.apply(openURL, value, [urlStringBinding.replace('tel:', 'sms:')]);
|
|
}
|
|
|
|
function showLongPressURLActionSheetOnPress_77308() { // fn#77308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:760, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8ebd, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
value.openURL(urlString);
|
|
}
|
|
|
|
function showLongPressURLActionSheetOnPress_77309() { // fn#77309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:836, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8eea, size: 67 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
(ToastUtilsModule).presentLinkCopied();
|
|
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
|
value.copy(urlString);
|
|
}
|
|
|
|
function showLongPressURLActionSheetOnPress_77310() { // fn#77310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:942, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8f2d, size: 58 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(ShowShareActionSheetAndroidModule).showShareActionSheet({url: urlString},
|
|
'Share Link');
|
|
}
|
|
|
|
function showLongPressURLActionSheetOnPress_77311() { // fn#77311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10048:1070, owner: showLongPressURLActionSheet.onPress, offset: 0x01df8f67, size: 80 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(HandleContentLinking)({guildId: guildId, channelId: channelId,
|
|
messageId: messageId, navigationSettings: {'navigationReplace': true, 'safe': true}});
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun77304, 9862, [4081, 1244, 3856, 6797, 3853, 9212, 9863, 6802,
|
|
2]) /* metro module 9862, dependencies: [4081, 1244, 3856, 6797, 3853, 9212, 9863, 6802, 2] */;
|