mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
fix: 🐛 Don't auto mention yourself when replying/quoting yourself
This commit is contained in:
parent
86e254b7e7
commit
a2a2149776
5 changed files with 31 additions and 10 deletions
|
|
@ -40,19 +40,22 @@ const { input: content } = useTextareaAutosize({
|
|||
const { Control_Enter, Command_Enter } = useMagicKeys();
|
||||
const respondingTo = ref<Status | null>(null);
|
||||
const respondingType = ref<"reply" | "quote" | null>(null);
|
||||
const me = useMe();
|
||||
|
||||
onMounted(() => {
|
||||
useListen("composer:reply", (note: Status) => {
|
||||
respondingTo.value = note;
|
||||
respondingType.value = "reply";
|
||||
content.value = `@${note.account.acct} `;
|
||||
if (note.account.id !== me.value?.id)
|
||||
content.value = `@${note.account.acct} `;
|
||||
textarea.value?.focus();
|
||||
});
|
||||
|
||||
useListen("composer:quote", (note: Status) => {
|
||||
respondingTo.value = note;
|
||||
respondingType.value = "quote";
|
||||
content.value = `@${note.account.acct} `;
|
||||
if (note.account.id !== me.value?.id)
|
||||
content.value = `@${note.account.acct} `;
|
||||
textarea.value?.focus();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ const loadingAuth = ref(false);
|
|||
const appData = useAppData();
|
||||
const tokenData = useTokenData();
|
||||
const client = useMegalodon();
|
||||
const me = useMe();
|
||||
|
||||
const compose = () => {
|
||||
useEvent("composer:open");
|
||||
|
|
@ -124,8 +125,9 @@ const signOut = async () => {
|
|||
tokenData.value.access_token,
|
||||
tokenData.value.access_token,
|
||||
)
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
|
||||
tokenData.value = null;
|
||||
me.value = null;
|
||||
};
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue