Files
discord-decomp/modules/keyboard/native/openCustomKeyboard.android.tsx
T
2026-11-01 12:12:55 +02:00

20 lines
884 B
TypeScript

// Metro module 11207 (f11208).
import { setKeyboardType } from "./KeyboardUIStore.native";
import { runAfterInteractions } from "../../../utils/native/RunAfterInteractionsUtils";
import { openPortalKeyboard } from "./PortalKeyboardUIStore.native";
import ChatInputNativeCommands from "../../chat_input/native/ChatInputNativeCommands";
export default function openCustomKeyboard({ channelId, chatInputRef, chatInputNativeRef, keyboardParams, secondaryTextFieldRef }) {
setKeyboardType(keyboardParams);
runAfterInteractions(() => {
chatInputRef.current.blur();
if (secondaryTextFieldRef != null) {
const current = secondaryTextFieldRef.current;
if (current != null) {
current.blur();
}
}
openPortalKeyboard(keyboardParams.type, channelId, chatInputRef);
ChatInputNativeCommands.openCustomKeyboard(chatInputNativeRef.current);
});
};