mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-24 05:47:00 -04:00
Fix inserting text when markdown preview is off
This commit is contained in:
parent
8be6c6e3ce
commit
8dd70f5d1a
5 changed files with 19 additions and 12 deletions
|
@ -16,6 +16,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { insertTextIntoChatInputBox } from "@utils/discord";
|
||||
import {
|
||||
ModalContent,
|
||||
ModalFooter,
|
||||
|
@ -24,7 +25,7 @@ import {
|
|||
ModalRoot,
|
||||
openModal,
|
||||
} from "@utils/modal";
|
||||
import { Button, ComponentDispatch, Forms, React, Switch, TextInput } from "@webpack/common";
|
||||
import { Button, Forms, React, Switch, TextInput } from "@webpack/common";
|
||||
|
||||
import { encrypt } from "../index";
|
||||
|
||||
|
@ -84,9 +85,7 @@ function EncModal(props: ModalProps) {
|
|||
const toSend = noCover ? encrypted.replaceAll("d", "") : encrypted;
|
||||
if (!toSend) return;
|
||||
|
||||
ComponentDispatch.dispatchToLastSubscribed("INSERT_TEXT", {
|
||||
rawText: `${toSend}`
|
||||
});
|
||||
insertTextIntoChatInputBox(toSend);
|
||||
|
||||
props.onClose();
|
||||
}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue