429 lines
28 KiB
TypeScript
429 lines
28 KiB
TypeScript
/* Metro module 14535; source: modules/threads/native/components/ThreadLongPressActionSheet.tsx; dependencies: [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859, 8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860, 22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856, 2] */
|
|
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import JoinedThreadsStore from '../../JoinedThreadsStore.tsx'; /* Metro dependency 3786 */
|
|
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
|
|
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
|
|
import ChannelSettingsActionCreators from '../../../../actions/ChannelSettingsActionCreators.tsx'; /* Metro dependency 8148 */
|
|
import UseHandleJoinThreadVoice from '../useHandleJoinThreadVoice.tsx'; /* Metro dependency 9626 */
|
|
import BuildFavoritesSectionButtonsNative from '../../../favorites/buildFavoritesSectionButtons.native.tsx'; /* Metro dependency 11234 */
|
|
import UseMobileChannelFavoriteActions from '../../../favorites/useMobileChannelFavoriteActions.tsx'; /* Metro dependency 11247 */
|
|
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as UserSettingsModule from '../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
|
|
import * as ToastUtilsModule from '../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
|
|
import * as LinkIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
|
|
import * as XLargeIconModule from '../../../../design/components/Icon/native/redesign/generated/XLargeIcon.tsx'; /* Metro dependency 4066 */
|
|
import * as ClipboardUtilsNativeModule from '../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
|
|
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
|
|
import * as ActionSheetRowNativeModule from '../../../../design/components/Sheet/native/ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
|
|
import * as ThreadHooksModule from '../../ThreadHooks.tsx'; /* Metro dependency 6860 */
|
|
import * as EyeIconModule from '../../../../design/components/Icon/native/redesign/generated/EyeIcon.tsx'; /* Metro dependency 8999 */
|
|
import * as ChannelNotificationIconModule from '../../../../design/components/Icon/native/redesign/generated/ChannelNotificationIcon.tsx'; /* Metro dependency 11241 */
|
|
import * as ActionSheetIconHeaderNativeModule from '../../../../design/components/Sheet/native/ActionSheetIconHeader.native.tsx'; /* Metro dependency 11251 */
|
|
|
|
function _fun109962(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:6, offset: 0x023635d2, size: 278 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ConstantsModule;
|
|
const env0_8 = value.AnalyticsObjectTypes;
|
|
const env0_9 = value.AnalyticsObjects;
|
|
const env0_10 = value.AnalyticsSections;
|
|
const env0_11 = value.ChannelSettingsSections;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_12 = value.jsx;
|
|
const env0_13 = value.jsxs;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/threads/native/components/ThreadLongPressActionSheet.tsx');
|
|
exports.default = ThreadLongPressActionSheet;
|
|
function ThreadLongPressActionSheetConnected({channel, onClose}) { // fn#109963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:279, offset: 0x023636e8, size: 1012 bytes, params: 2, frame: 37
|
|
var r5;
|
|
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
|
var Group;
|
|
var intl;
|
|
const env0_2 = channel.getGuildId();
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun109964);
|
|
const {isMuted,
|
|
hasJoined} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([JoinedThreadsStore],
|
|
function() {
|
|
var object = {};
|
|
var joinedThreadsStoreBinding = JoinedThreadsStore;
|
|
var channelBinding = channel;
|
|
object.isMuted = joinedThreadsStoreBinding.isMuted(channelBinding.id);
|
|
object.hasJoined = JoinedThreadsStore.hasJoined(channelBinding.id);
|
|
return object;
|
|
});
|
|
const value3 = (ThreadHooksModule).useCanManageThread(channel);
|
|
const value4 = (ThreadHooksModule).useIsThreadModerator(channel);
|
|
const value5 = (ThreadHooksModule).useCanUnarchiveThread(channel);
|
|
const value6 = (ThreadHooksModule).useCanJoinThreadVoice(channel);
|
|
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
|
|
return VoiceStateStore.isInChannel(channel.id);
|
|
});
|
|
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([VoiceStateStore], function() {
|
|
return !importDefault(dependencyMap[32]).isEmpty(VoiceStateStore.getVoiceStatesForChannel(channel.id));
|
|
});
|
|
const value9 = (UseHandleJoinThreadVoice)(channel);
|
|
const value10 = (UseChannelName)(channel, true);
|
|
const DeveloperMode = (UserSettingsModule).DeveloperMode;
|
|
const value11 = DeveloperMode.useSetting();
|
|
const env0_3 = value11;
|
|
const value12 = (UseMobileChannelFavoriteActions)(channel,
|
|
'ThreadLongPressActionSheet');
|
|
const r10 = (
|
|
guild != null
|
|
? ((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
|
|
: ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE} channel={channel} />)((require(1305) /* metro dependency 1305: native */).Avatar)
|
|
);
|
|
object = {channel: channel, guild: guild, canManageThread: value3, canModerateThread: value4,
|
|
canUnarchiveThread: value5, isMuted: isMuted, hasJoined: hasJoined};
|
|
object.isForumPost = channel.isForumPost();
|
|
object.handleJoinThreadVoice = value6 ? value7 ? null : value9 : null;
|
|
object.hasActiveThreadVoice = value8;
|
|
object.favorites = value12;
|
|
const value16 = ThreadLongPressActionSheetConnectedGetActionSheetButtons(object);
|
|
env0_3.useEffect(_fun109981, [value16.length, value11, onClose]);
|
|
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
|
|
object = {};
|
|
const ActionSheetIconHeader = (ActionSheetIconHeaderNativeModule).ActionSheetIconHeader;
|
|
object.header = <ActionSheetIconHeader title={value10} icon={r10} />;
|
|
const value17 = value16.map(_fun109982);
|
|
if (value11) {
|
|
Group = ActionSheetRow.Group;
|
|
var actionSheetRowProps = {icon: ((Icon) => <Icon IconComponent={(require(8772) /* metro dependency 8772: IdIcon */).IdIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
actionSheetRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.DQ797g);
|
|
actionSheetRowProps.onPress = onPress_109985;
|
|
r5 = (
|
|
<Group hasIcons key="developer-actions">
|
|
<ActionSheetRow {...actionSheetRowProps} />
|
|
</Group>
|
|
);
|
|
} else {
|
|
r5 = value11;
|
|
}
|
|
return (
|
|
<ActionSheet {...object}>
|
|
{value17}
|
|
{r5}
|
|
</ActionSheet>
|
|
);
|
|
function _fun109964() { // fn#109964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:405, offset: 0x01b9812e, size: 27 bytes, params: 1, frame: 11
|
|
return GuildStore.getGuild(env0_2);
|
|
}
|
|
|
|
function ThreadLongPressActionSheetConnectedGetActionSheetButtons({channel, canManageThread, canModerateThread, canUnarchiveThread, isMuted, hasJoined, isForumPost, handleJoinThreadVoice, hasActiveThreadVoice, favorites}) { // fn#109968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1096, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons, offset: 0x02363b80, size: 1846 bytes, params: 2, frame: 31
|
|
var object2;
|
|
var object4;
|
|
var object5;
|
|
const XLargeIcon = (XLargeIconModule).XLargeIcon;
|
|
var object6;
|
|
var isLockedThread2;
|
|
var object7;
|
|
var object9;
|
|
const items2 = [];
|
|
let push = items2.push;
|
|
const object10 = {};
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
object10.label = Reflect.apply(string, intl, [t.e6RscS]);
|
|
const EyeIcon = (EyeIconModule).EyeIcon;
|
|
object10.IconComponent = EyeIcon;
|
|
object10.onPress = function() {
|
|
require(dependencyMap[9]).ack(channel.id, {section: AnalyticsSections.THREAD_ACTION_SHEET,
|
|
object: AnalyticsObjects.MARK_THREAD_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL}, true,
|
|
true);
|
|
};
|
|
Reflect.apply(push, items2, [{sectionKey: 'mark-as-read', buttons: [object10]}]);
|
|
const value2 = (BuildFavoritesSectionButtonsNative)(favorites);
|
|
if (value2 != null) {
|
|
items2.push({sectionKey: 'favorites', buttons: [value2]});
|
|
}
|
|
const object11 = {sectionKey: 'channel-actions', buttons: []};
|
|
let buttons = object11.buttons;
|
|
push = buttons.push;
|
|
if (hasJoined) {
|
|
object4 = {};
|
|
string = intl.string;
|
|
object4.label = isForumPost ? Reflect.apply(string, intl, [t['2LsZdT']]) : Reflect.apply(string, intl,
|
|
[t['fa/84m']]);
|
|
object4.IconComponent = (require(4054) /* metro dependency 4054: UserMinusIcon */).UserMinusIcon;
|
|
object4.isDestructive = true;
|
|
object4.onPress = onPress_109970;
|
|
Reflect.apply(push, buttons, [object4]);
|
|
} else {
|
|
object2 = {};
|
|
string = intl.string;
|
|
object2.label = isForumPost ? Reflect.apply(string, intl, [t.ihLPiO]) : Reflect.apply(string, intl,
|
|
[t['10kukS']]);
|
|
object2.IconComponent = (require(10859) /* metro dependency 10859: GroupPlusIcon */).GroupPlusIcon;
|
|
object2.onPress = onPress_109971;
|
|
Reflect.apply(push, buttons, [object2]);
|
|
}
|
|
if (handleJoinThreadVoice != null) {
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
object5 = {};
|
|
string = intl.string;
|
|
object5.label = hasActiveThreadVoice ? Reflect.apply(string, intl, [t['0D/6Rz']]) : Reflect.apply(string, intl,
|
|
[t.My50nf]);
|
|
object5.IconComponent = (require(8850) /* metro dependency 8850: PhoneCallIcon */).PhoneCallIcon;
|
|
object5.onPress = handleJoinThreadVoice;
|
|
Reflect.apply(push, buttons, [object5]);
|
|
}
|
|
const threadMetadata = channel.threadMetadata;
|
|
if (threadMetadata == null) {
|
|
if (canManageThread) {
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
string = intl.string;
|
|
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
|
|
[t.BTs4Kb]) : Reflect.apply(string,
|
|
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
|
|
}
|
|
} else if (threadMetadata.archived) {
|
|
if (canUnarchiveThread) {
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
object6 = {};
|
|
string = intl.string;
|
|
object6.label = isForumPost ? Reflect.apply(string, intl, [t.cnRubV]) : Reflect.apply(string, intl,
|
|
[t.S9E4G7]);
|
|
object6.IconComponent = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
|
|
object6.onPress = onPress_109972;
|
|
Reflect.apply(push, buttons, [object6]);
|
|
}
|
|
} else if (canManageThread) {
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
string = intl.string;
|
|
Reflect.apply(push, buttons, [{label: isForumPost ? Reflect.apply(string, intl,
|
|
[t.BTs4Kb]) : Reflect.apply(string,
|
|
intl, [t.wiIevd]), IconComponent: XLargeIcon, onPress: onPress_109973}]);
|
|
}
|
|
if (canModerateThread) {
|
|
isLockedThread2 = channel.isLockedThread();
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
object7 = {};
|
|
string = intl.string;
|
|
if (isLockedThread2) {
|
|
object7.label = isForumPost ? Reflect.apply(string, intl, [t['/OKSxp']]) : Reflect.apply(string, intl,
|
|
[t['jeyb/W']]);
|
|
object7.IconComponent = (require(11237) /* metro dependency 11237: LockUnlockedIcon */).LockUnlockedIcon;
|
|
object7.onPress = onPress_109974;
|
|
Reflect.apply(push, buttons, [object7]);
|
|
} else {
|
|
object7.label = isForumPost ? Reflect.apply(string, intl, [t['Ur/0Na']]) : Reflect.apply(string, intl,
|
|
[t.HoCqm8]);
|
|
object7.IconComponent = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
|
|
object7.onPress = onPress_109975;
|
|
Reflect.apply(push, buttons, [object7]);
|
|
}
|
|
}
|
|
if (canModerateThread) {
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
object9 = {};
|
|
string = intl.string;
|
|
object9.label = isForumPost ? Reflect.apply(string, intl, [t.NP1yHG]) : Reflect.apply(string, intl,
|
|
[t['2Mk1TP']]);
|
|
object9.IconComponent = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
|
|
object9.onPress = onPress_109976;
|
|
Reflect.apply(push, buttons, [object9]);
|
|
}
|
|
buttons = object11.buttons;
|
|
push = buttons.push;
|
|
const object12 = {};
|
|
string = intl.string;
|
|
const WqhZss = t.WqhZss;
|
|
object12.label = Reflect.apply(string, intl, [WqhZss]);
|
|
const LinkIcon = (LinkIconModule).LinkIcon;
|
|
object12.IconComponent = LinkIcon;
|
|
object12.isDestructive = false;
|
|
object12.onPress = onPress_109977;
|
|
Reflect.apply(push, buttons, [object12]);
|
|
items2.push(object11);
|
|
const object13 = {sectionKey: 'notifications', buttons: []};
|
|
buttons = object13.buttons;
|
|
push = buttons.push;
|
|
const object14 = {};
|
|
string = intl.string;
|
|
if (isMuted) {
|
|
object14.label = isForumPost ? Reflect.apply(string, intl, [t['0JQfsP']]) : Reflect.apply(string, intl,
|
|
[t['Cq/TzF']]);
|
|
object14.IconComponent = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
|
|
object14.onPress = onPress_109978;
|
|
Reflect.apply(push, buttons, [object14]);
|
|
} else {
|
|
object14.label = isForumPost ? Reflect.apply(string, intl, [t['nP+Ykd']]) : Reflect.apply(string, intl,
|
|
[t.bUUd8q]);
|
|
object14.IconComponent = (require(10629) /* metro dependency 10629: BellSlashIcon */).BellSlashIcon;
|
|
object14.onPress = onPress_109979;
|
|
Reflect.apply(push, buttons, [object14]);
|
|
}
|
|
buttons = object13.buttons;
|
|
push = buttons.push;
|
|
const object15 = {};
|
|
object15.label = intl.string(t.h850Ss);
|
|
const ChannelNotificationIcon = (ChannelNotificationIconModule).ChannelNotificationIcon;
|
|
object15.IconComponent = ChannelNotificationIcon;
|
|
object15.onPress = onPress_109980;
|
|
object15.disableColor = true;
|
|
Reflect.apply(push, buttons, [object15]);
|
|
items2.push(object13);
|
|
return items2;
|
|
function getActionSheetButtonsOnPress_109970() { // fn#109970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:1836, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364320, size: 52 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.leaveThread(channel, 'Context Menu');
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109971() { // fn#109971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2028, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364354, size: 52 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.joinThread(channel, 'Context Menu');
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109972() { // fn#109972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2415, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364388, size: 48 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.unarchiveThread(channel, false);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109973() { // fn#109973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2596, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643b8, size: 48 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.archiveThread(channel, false);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109974() { // fn#109974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2807, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023643e8, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.unlockThread(channel);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109975() { // fn#109975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:2980, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364415, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.lockThread(channel);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109976() { // fn#109976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3157, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364442, size: 80 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__.__proto__;
|
|
const defaultImport = ChannelSettingsActionCreators;
|
|
const setSection = defaultImport.setSection;
|
|
const OVERVIEW = ChannelSettingsSections.OVERVIEW;
|
|
Reflect.apply(setSection, defaultImport, [OVERVIEW]);
|
|
value = defaultImport;
|
|
value.open(channel.id);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109977() { // fn#109977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3331, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364492, size: 56 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(12148) /* metro dependency 12148: ChannelActionSheetUtils */;
|
|
const copyGuildChannelOrThreadLink = value.copyGuildChannelOrThreadLink;
|
|
const channelBinding = channel;
|
|
Reflect.apply(copyGuildChannelOrThreadLink, value, [channelBinding.guild_id, channelBinding.id]);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109978() { // fn#109978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3602, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x023644ca, size: 60 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(7153) /* metro dependency 7153: ThreadActionCreators */;
|
|
value.setNotificationSettings(channel, {muted: !isMuted});
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109979() { // fn#109979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:3802, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x02364506, size: 135 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[24]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[26]);
|
|
value = value(dependencyMap[25], dependencyMap.paths);
|
|
const channelBinding = channel;
|
|
const value3 = 'muteSettings' + channelBinding.id;
|
|
const object = {};
|
|
object.guildId = channelBinding.getGuildId();
|
|
object.channelId = channelBinding.id;
|
|
Reflect.apply(openLazy, defaultImport, [value, value3, object]);
|
|
}
|
|
|
|
function getActionSheetButtonsOnPress_109980() { // fn#109980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4027, owner: ThreadLongPressActionSheetConnected.getActionSheetButtons.onPress, offset: 0x0236458d, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(11243) /* metro dependency 11243: threadActionSheets */;
|
|
value.showThreadNotificationsBottomSheet(channel);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun109981() { // fn#109981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4336, offset: 0x020a8089, size: 42 bytes, params: 1, frame: 10
|
|
if (!(env0_4.length !== 0 || env0_3)) {
|
|
onClose();
|
|
}
|
|
}
|
|
|
|
function _fun109982(a0) { // fn#109982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4479, offset: 0x023645ba, size: 97 bytes, params: 2, frame: 18
|
|
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
|
|
const Group = ActionSheetRow.Group;
|
|
return (
|
|
<Group hasIcons key={a0.sectionKey}>
|
|
{a0.buttons.map(_fun109983)}
|
|
</Group>
|
|
);
|
|
function _fun109983({label, IconComponent, trailing, isDestructive, disableColor, onPress}, a1) { // fn#109983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:4551, offset: 0x0236461b, size: 179 bytes, params: 3, frame: 22
|
|
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
|
|
const r7 = isDestructive ? 'danger' : 'default';
|
|
const ActionSheetRow2 = (ActionSheetRowNativeModule).ActionSheetRow;
|
|
const Icon = ActionSheetRow2.Icon;
|
|
return (
|
|
<ActionSheetRow
|
|
label={label}
|
|
variant={r7}
|
|
icon={<Icon IconComponent={IconComponent} disableColor={disableColor} />}
|
|
trailing={trailing}
|
|
onPress={function() {
|
|
onClose();
|
|
onPress();
|
|
}}
|
|
key={a1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function ThreadLongPressActionSheetConnectedOnPress() { // fn#109985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5029, owner: ThreadLongPressActionSheetConnected.onPress, offset: 0x023646e8, size: 80 bytes, params: 1, frame: 14
|
|
onClose();
|
|
ClipboardUtilsNativeModule.copy(channel.id);
|
|
(ToastUtilsModule).presentIdCopied();
|
|
}
|
|
|
|
}
|
|
|
|
function ThreadLongPressActionSheet({channelId, onClose}) { // fn#109986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14732:5222, offset: 0x02364738, size: 153 bytes, params: 2, frame: 18
|
|
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
|
return ChannelStore.getChannel(channelId);
|
|
});
|
|
ReactModule.useEffect(function() {
|
|
if (channel == null) {
|
|
onClose();
|
|
}
|
|
}, [channel, onClose]);
|
|
return (
|
|
channel != null
|
|
? (
|
|
<ThreadLongPressActionSheetConnected channel={channel} onClose={onClose} />
|
|
)
|
|
: null
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun109962, 14535, [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859,
|
|
8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860,
|
|
22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856,
|
|
2]) /* metro module 14535, dependencies: [31, 1379, 1867, 4297, 3786, 661, 33, 1244, 8999, 5097, 11234, 4054, 7153, 10859, 8850, 4076, 4066, 11237, 6705, 9646, 8148, 4056, 12148, 10629, 4080, 10936, 1962, 9216, 11241, 11243, 566, 6860, 22, 9626, 4805, 3829, 11247, 6819, 1305, 6805, 11251, 6807, 8772, 6797, 3856, 2] */;
|