mirror of
https://github.com/paricafe/misskey.git
synced 2025-02-17 14:47:29 -06:00
update counts immediately
This commit is contained in:
parent
afec66841d
commit
ec500ccdae
2 changed files with 20 additions and 8 deletions
|
@ -916,7 +916,16 @@ async function post(ev?: MouseEvent) {
|
|||
}
|
||||
nextTick(() => {
|
||||
deleteDraft();
|
||||
if (props.reply) {
|
||||
props.reply.repliesCount = (props.reply.repliesCount || 0) + 1;
|
||||
}
|
||||
if (props.quote) {
|
||||
props.renote.renoteCount = (props.renote.renoteCount || 0) + 1;
|
||||
}
|
||||
emit('posted');
|
||||
if (postAccount.value != null ? postAccount.value.id : null) {
|
||||
postAccount.value = null;
|
||||
}
|
||||
if (postData.text && postData.text !== '') {
|
||||
const hashtags_ = mfm.parse(postData.text).map(x => x.type === 'hashtag' && x.props.hashtag).filter(x => x) as string[];
|
||||
const history = JSON.parse(miLocalStorage.getItem('hashtags') ?? '[]') as string[];
|
||||
|
|
|
@ -576,6 +576,7 @@ export function getRenoteMenu(props: {
|
|||
channelId: appearNote.channelId,
|
||||
}).then(() => {
|
||||
os.toast(i18n.ts.renoted);
|
||||
appearNote.renoteCount = (appearNote.renoteCount || 0) + 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -624,6 +625,7 @@ export function getRenoteMenu(props: {
|
|||
renoteId: appearNote.id,
|
||||
}).then(() => {
|
||||
os.toast(i18n.ts.renoted);
|
||||
appearNote.renoteCount = (appearNote.renoteCount || 0) + 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -665,6 +667,7 @@ export function getRenoteMenu(props: {
|
|||
channelId: channel.id,
|
||||
}).then(() => {
|
||||
os.toast(i18n.tsx.renotedToX({ name: channel.name }));
|
||||
appearNote.renoteCount = (appearNote.renoteCount || 0) + 1;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue