Skip to content

Commit

Permalink
Fixed AutoComplete preventing emtoes from loading
Browse files Browse the repository at this point in the history
  • Loading branch information
ftk789 committed Sep 21, 2024
1 parent 3ac630f commit e5d727d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/site/kick.com/modules/chat/ChatController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</template>

<ChatData />
<ChatEmoteMenu @pick-emote="(ae) => insertToInput(ae.provider === 'EMOJI' ? ae.unicode ?? ae.name : ae.name)" />
</template>

<script setup lang="ts">
Expand All @@ -15,7 +14,6 @@ import { log } from "@/common/Logger";
import { useChannelContext } from "@/composable/channel/useChannelContext";
import { useWorker } from "@/composable/useWorker";
import ChatAutocomplete from "./ChatAutocomplete.vue";
import ChatEmoteMenu from "./ChatEmoteMenu.vue";
import ChatObserver from "./ChatObserver.vue";
import ChatData from "@/app/chat/ChatData.vue";
Expand All @@ -27,12 +25,10 @@ defineExpose({
onMessageSend,
});
function onMessageSend(text: string) {
function onMessageSend() {
sendWorkerMessage("CHANNEL_ACTIVE_CHATTER", {
channel: toRaw(ctx),
});
autocomplete.value?.handleMessageSend(text);
}
// need to fetch the channel because we can only get the chatroom ID from this which isn't equal to the user ID
Expand All @@ -53,12 +49,6 @@ const shallowList = ref<HTMLDivElement | null>(null);
const autocomplete = ref<InstanceType<typeof ChatAutocomplete> | null>(null);
function insertToInput(value: string): void {
if (!autocomplete.value) return;
autocomplete.value.insertAtEnd(value);
}
let observer: ObserverPromise<HTMLDivElement> | null = null;
watchEffect(async () => {
Expand Down

0 comments on commit e5d727d

Please sign in to comment.