74 lines
4.7 KiB
TypeScript
74 lines
4.7 KiB
TypeScript
/* Metro module 11289; source: modules/chat/native/ChatViewStickyHeader.tsx; dependencies: [57, 31, 9734, 33, 11290, 11294, 11295, 11296, 11306, 11309, 11310, 11312, 11314, 11317, 2] */
|
|
function _fun86174(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:6, offset: 0x01f8a8b4, size: 231 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(9734) /* metro dependency 9734: Constants */).LOCATION_CONTEXT_MOBILE;
|
|
const value2 = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value2.jsx;
|
|
const env0_7 = value2.Fragment;
|
|
const env0_8 = value2.jsxs;
|
|
value = value.memo(value.forwardRef(_fun86176));
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat/native/ChatViewStickyHeader.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function ChatViewStickyHeaderAccountSafetyWarnings({channelId, senderId}) { // fn#86175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:190, offset: 0x01f8a99b, size: 279 bytes, params: 2, frame: 21
|
|
var r0;
|
|
var value;
|
|
const value2 = (require(11290) /* metro dependency 11290: useStrangerDangerWarning */).useStrangerDangerWarning(channelId);
|
|
const value3 = (require(11294) /* metro dependency 11294: useInappropriateConversationBannerForChannel */).useInappropriateConversationBannerForChannel(channelId,
|
|
LOCATION_CONTEXT_MOBILE);
|
|
const value4 = (require(11295) /* metro dependency 11295: useLikelyAtoWarning */).useLikelyAtoWarning(channelId);
|
|
if (value4 != null) {
|
|
value = importDefault(11296) /* metro dependency 11296: LikelyAtoWarningBanner */;
|
|
value = ((Component) => <Component channelId={channelId} warningId={value4.id} senderId={senderId} />)(value);
|
|
r0 = value;
|
|
} else if (value2 != null) {
|
|
value = importDefault(11306) /* metro dependency 11306: StrangerDangerWarningBanner */;
|
|
value = ((Component) => <Component channelId={channelId} warningId={value2.id} senderId={senderId} />)(value);
|
|
r0 = value;
|
|
} else if (value3 != null) {
|
|
value = importDefault(11309) /* metro dependency 11309: InappropriateConversationWarningBanner */;
|
|
value = ((Component) => <Component channelId={channelId} warningId={value3.id} senderId={senderId} />)(value);
|
|
r0 = value;
|
|
} else {
|
|
r0 = null;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun86176({channel, scrollToNewMessages}, a1) { // fn#86176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:611, offset: 0x01f8aab2, size: 370 bytes, params: 3, frame: 25
|
|
const binding = env0_4;
|
|
const [property, env0_1] = env0_3(binding.useState(false), 2);
|
|
const {showUnreadsNotice,
|
|
clearUnreadsNotice} = (importDefault(11310) /* metro dependency 11310: useUnreadSettingNotice */)(channel);
|
|
binding.useImperativeHandle(a1, function() {
|
|
return {onChatViewScrolled: _fun86178};
|
|
});
|
|
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
const items2 = [channel.isForumPost() && property ? ((Component) => <Component channel={channel} />)(importDefault(11312) /* metro dependency 11312: ForumPostActionBar */) : null];
|
|
items2[1] = channel.isDM() ? <ChatViewStickyHeaderAccountSafetyWarnings channelId={channel.id} senderId={channel.getRecipientId()} /> : null;
|
|
items2[2] = showUnreadsNotice ? ((Component) => <Component channel={channel} clearUnreadsNotice={clearUnreadsNotice} />)(importDefault(11314) /* metro dependency 11314: UnreadSettingNotice */) : null;
|
|
items2[3] = ((Component) => <Component channel={channel} handleScrollToNewMessages={scrollToNewMessages} />)(importDefault(11317) /* metro dependency 11317: ChatBanner */);
|
|
return (
|
|
<>
|
|
{items2}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun86177() { // fn#86177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:792, offset: 0x01f8ac24, size: 18 bytes, params: 1, frame: 2
|
|
return {onChatViewScrolled: onChatViewScrolled};
|
|
}
|
|
|
|
function onChatViewScrolled({isFirstMessageVisible}) { // fn#86178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11475:817, offset: 0x01f8ac36, size: 47 bytes, params: 2, frame: 12
|
|
const channelBinding = channel;
|
|
if (channelBinding.isForumPost()) {
|
|
env1_1(!isFirstMessageVisible);
|
|
}
|
|
}
|
|
|