mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -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
|
@ -17,7 +17,7 @@
|
|||
*/
|
||||
|
||||
import { findLazy } from "@webpack";
|
||||
import { ChannelStore, GuildStore, PrivateChannelsStore, SelectedChannelStore } from "@webpack/common";
|
||||
import { ChannelStore, ComponentDispatch, GuildStore, PrivateChannelsStore, SelectedChannelStore } from "@webpack/common";
|
||||
import { Guild } from "discord-types/general";
|
||||
|
||||
const PreloadedUserSettings = findLazy(m => m.ProtoClass?.typeName.endsWith("PreloadedUserSettings"));
|
||||
|
@ -42,3 +42,10 @@ export const enum Theme {
|
|||
export function getTheme(): Theme {
|
||||
return PreloadedUserSettings.getCurrentValue()?.appearance?.theme;
|
||||
}
|
||||
|
||||
export function insertTextIntoChatInputBox(text: string) {
|
||||
ComponentDispatch.dispatchToLastSubscribed("INSERT_TEXT", {
|
||||
rawText: text,
|
||||
plainText: text
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue