merge: Make confirm follow prompt not show up when cancelling a follow request (!941)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/941 Closes #822 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
commit
aa1691295b
3 changed files with 16 additions and 1 deletions
|
|
@ -106,7 +106,7 @@ async function onClick() {
|
|||
userId: props.user.id,
|
||||
});
|
||||
} else {
|
||||
if (defaultStore.state.alwaysConfirmFollow) {
|
||||
if (defaultStore.state.alwaysConfirmFollow && !hasPendingFollowRequestFromYou.value) {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'question',
|
||||
text: i18n.tsx.followConfirm({ name: props.user.name || props.user.username }),
|
||||
|
|
@ -119,6 +119,16 @@ async function onClick() {
|
|||
}
|
||||
|
||||
if (hasPendingFollowRequestFromYou.value) {
|
||||
const { canceled } = await os.confirm({
|
||||
type: 'question',
|
||||
text: i18n.ts.undoFollowRequestConfirm,
|
||||
});
|
||||
|
||||
if (canceled) {
|
||||
wait.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
await misskeyApi('following/requests/cancel', {
|
||||
userId: props.user.id,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue