decord/source/components_native/chat/JumpToPresentButton.tsx

105 lines
4 KiB
TypeScript
Raw Normal View History

// Module ID: 12267
// Function ID: 12268
2026-07-21 06:55:02 +00:00
// Name: JumpToPresentButton
// Dependencies: [19, 17, 9485, 5277, 4781, 21, 4560, 576, 1115, 4262, 504, 9681, 1114, 12268, 12269, 12270, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12267 (JumpToPresentButton)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
import map from "map" /* 4262 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import updateChatInputContainerHeight from "updateChatInputContainerHeight" /* 9485 */;
import closure_6 from "updateChatInputContainerHeight" /* 9485 */;
import closure_7 from "_handleConnectionOpen" /* 5277 */;
import closure_8 from "reinjectEphemerals" /* 4781 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
import set from "set" /* 1115 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-09-03 10:05:34 +00:00
({ useChatInputContainerHeight: c4, useSmallSuggestionBarHeight: c5 } = updateChatInputContainerHeight);
2026-07-29 08:29:29 +00:00
createCacheKey = { container: null, containerIOS: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { borderRadius: ThemesDefault.radii.round, position: "absolute", right: ThemesDefault.modules.mobile.JUMP_TO_PRESENT_RIGHT_SPACING };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-09-03 10:05:34 +00:00
createCacheKey[1] = { bottom: "100%", pointerEvents: "box-none" };
let closure_10 = createCacheKey.createStyles(createCacheKey);
let closure_11 = set.isIOS() ? ((arg0) => {
const obj = { marginBottom: null };
const token = map.useToken(ThemesDefault.modules.mobile.JUMP_TO_PRESENT_BOTTOM_SPACING);
obj[0] = token + callback2(arg0);
return obj;
}) : ((arg0) => {
2026-08-24 06:08:38 +00:00
let obj = map;
2026-07-29 08:29:29 +00:00
obj = { bottom: null };
2026-08-24 06:08:38 +00:00
const token = obj.useToken(ThemesDefault.modules.mobile.JUMP_TO_PRESENT_BOTTOM_SPACING);
2026-09-03 10:05:34 +00:00
const sum = callback(arg0) + token;
obj[0] = sum + callback2(arg0);
2026-07-20 16:05:17 +00:00
return obj;
2026-07-23 10:11:24 +00:00
});
const result = set.fileFinishedImporting("components_native/chat/JumpToPresentButton.tsx");
2026-07-20 16:05:17 +00:00
export default function JumpToPresentButton(channelId) {
channelId = channelId.channelId;
const screenIndex = channelId.screenIndex;
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-09-03 10:05:34 +00:00
let tmp = callback4();
const tmp2 = callback5(screenIndex);
let obj = channelId(504);
2026-09-03 10:05:34 +00:00
const items = [closure_7];
2026-07-29 08:29:29 +00:00
dependencyMap = obj.useStateFromStores(items, () => connected.isConnected(), []);
2026-09-03 10:05:34 +00:00
let tmp5 = callback3((showingAutoComplete) => {
2026-07-29 08:29:29 +00:00
let tmp = closure_2;
if (tmp) {
2026-07-20 16:05:17 +00:00
showingAutoComplete = showingAutoComplete.showingAutoComplete;
2026-07-29 08:29:29 +00:00
const value = showingAutoComplete.get(screenIndex);
let tmp5 = !value;
if (!value) {
2026-07-20 16:05:17 +00:00
const showJumpToPresentButtonChannelId = showingAutoComplete.showJumpToPresentButtonChannelId;
2026-07-29 08:29:29 +00:00
tmp5 = showJumpToPresentButtonChannelId.get(tmp3) === channelId;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp5;
tmp3 = screenIndex;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
const isVoicePanelMounted = channelId(9681).useIsVoicePanelMounted(channelId);
const obj2 = channelId(9681);
const isVoicePanelOpen = channelId(9681).useIsVoicePanelOpen(channelId);
const obj3 = channelId(9681);
2026-09-03 10:05:34 +00:00
const items1 = [closure_8];
const stateFromStores = channelId(504).useStateFromStores(items1, () => null != closure_1_8.getMessages(channelId).jumpReturnTargetId);
2026-08-31 15:47:37 +00:00
if (!tmp5) {
2026-07-20 16:05:17 +00:00
return null;
}
const obj4 = channelId(504);
2026-09-03 10:05:34 +00:00
let tmp10 = tmp2;
if (tmp3Result.isIOS()) {
const items2 = [tmp.containerIOS, tmp2];
tmp10 = items2;
2026-07-20 16:05:17 +00:00
}
const intl = tmp3(1114).intl;
2026-07-20 16:05:17 +00:00
const string = intl.string;
const t = tmp3(1114).t;
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
let stringResult = string(t.dpjpOp);
} else {
stringResult = string(t.gpoQsB);
}
2026-09-03 10:05:34 +00:00
obj = { style: items3, children: null };
items3 = [tmp.container, tmp10];
2026-08-31 15:47:37 +00:00
if (tmp5) {
obj = { accessibilityLabel: null, icon: null, onPress: null };
obj[0] = stringResult;
obj[1] = screenIndex(12269);
2026-08-31 15:47:37 +00:00
obj[2] = channelId.onJumpToPresent;
let tmp12Result = tmp12(screenIndex(12268), obj);
const tmp16 = screenIndex(12268);
2026-07-20 16:05:17 +00:00
} else {
tmp12Result = tmp12(tmp3(12270).MemoedVoicePanelDismissChatButton, {});
2026-07-20 16:05:17 +00:00
}
2026-09-03 10:05:34 +00:00
obj[1] = tmp12Result;
return <View style={items3}>{null}</View>;
2026-07-20 16:05:17 +00:00
};