73 lines
5.0 KiB
TypeScript
73 lines
5.0 KiB
TypeScript
/* Metro module 11790; source: components_native/chat/JumpToPresentButton.tsx; dependencies: [31, 27, 7729, 4257, 4814, 33, 4501, 697, 477, 566, 7713, 8341, 1244, 11791, 11792, 2] */
|
|
function _fun90300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:6, offset: 0x02033c5c, size: 364 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
const useChatBottomManagerUIStore = importDefault(7729) /* metro dependency 7729: useChatBottomManagerUIStore */;
|
|
const env0_5 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useChatInputContainerHeight;
|
|
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
|
const messageStore = importDefault(4814) /* metro dependency 4814: MessageStore */;
|
|
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
|
|
let value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object = {'borderRadius': null, 'position': 'absolute', 'right': 12};
|
|
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const env0_9 = Reflect.apply(createStyles, value, [{container: object, containerIOS: {'bottom': '100%',
|
|
'marginBottom': 12, 'pointerEvents': 'box-none'}}]);
|
|
value = require(477) /* metro dependency 477: PlatformUtils */;
|
|
const env0_10 = value.isIOS() ? function() {
|
|
return null;
|
|
} : _fun90302;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/chat/JumpToPresentButton.tsx');
|
|
exports.default = JumpToPresentButton;
|
|
}
|
|
|
|
function _fun90302(a0) { // fn#90302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:398, offset: 0x02033dc8, size: 32 bytes, params: 2, frame: 12
|
|
const object2 = {};
|
|
object2.bottom = useChatInputContainerHeight(a0) + 12;
|
|
return object2;
|
|
}
|
|
|
|
function JumpToPresentButton({channelId, screenIndex, onJumpToPresent}) { // fn#90303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:511, offset: 0x02033de8, size: 469 bytes, params: 2, frame: 26
|
|
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const styles = useStyles();
|
|
const value2 = env0_10(screenIndex);
|
|
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore],
|
|
function() {
|
|
return GatewayConnectionStore.isConnected();
|
|
}, []);
|
|
const value3 = useChatBottomManagerUIStore(_fun90305);
|
|
const value4 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelMounted(channelId);
|
|
const value5 = (require(7713) /* metro dependency 7713: VoicePanelUtilsNative */).useIsVoicePanelOpen(channelId);
|
|
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MessageStore], function() {
|
|
return MessageStore.getMessages(channelId).jumpReturnTargetId != null;
|
|
});
|
|
if (value3) {
|
|
return (
|
|
<View style={[styles.container, value2 ?? styles.containerIOS]}>
|
|
{value3 ? <IconButton accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)} onPress={onJumpToPresent} icon={importDefault(11791) /* metro dependency 11791 */} variant="primary-overlay" /> : ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)}
|
|
</View>
|
|
);
|
|
}
|
|
if (value4) {
|
|
if (value5) {
|
|
return (
|
|
<View style={[styles.container, value2 ?? styles.containerIOS]}>
|
|
{value3 ? <IconButton accessibilityLabel={value6 ? intl.string(t.dpjpOp) : intl.string(t.gpoQsB)} onPress={onJumpToPresent} icon={importDefault(11791) /* metro dependency 11791 */} variant="primary-overlay" /> : ((MemoedVoicePanelDismissChatButton) => <MemoedVoicePanelDismissChatButton />)((require(11792) /* metro dependency 11792: VoicePanelChatView */).MemoedVoicePanelDismissChatButton)}
|
|
</View>
|
|
);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _fun90305(a0) { // fn#90305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11976:668, offset: 0x02033fd0, size: 78 bytes, params: 2, frame: 14
|
|
const binding = env0_2;
|
|
return binding ? !a0.showingAutoComplete.get(screenIndex) && a0.showJumpToPresentButtonChannelId.get(screenIndex) === channelId : !!binding;
|
|
}
|
|
|