feat: Undo Accept (#7980)
* allow breaking of follow * send undo * delete by using reject follow
This commit is contained in:
@ -109,6 +109,14 @@ export function getUserMenu(user) {
|
||||
return !confirm.canceled;
|
||||
}
|
||||
|
||||
async function invalidateFollow() {
|
||||
os.apiWithDialog('following/invalidate', {
|
||||
userId: user.id
|
||||
}).then(() => {
|
||||
user.isFollowed = !user.isFollowed;
|
||||
})
|
||||
}
|
||||
|
||||
let menu = [{
|
||||
icon: 'fas fa-at',
|
||||
text: i18n.locale.copyUsername,
|
||||
@ -153,6 +161,14 @@ export function getUserMenu(user) {
|
||||
action: toggleBlock
|
||||
}]);
|
||||
|
||||
if (user.isFollowed) {
|
||||
menu = menu.concat([{
|
||||
icon: 'fas fa-unlink',
|
||||
text: i18n.locale.breakFollow,
|
||||
action: invalidateFollow
|
||||
}]);
|
||||
}
|
||||
|
||||
menu = menu.concat([null, {
|
||||
icon: 'fas fa-exclamation-circle',
|
||||
text: i18n.locale.reportAbuse,
|
||||
|
Reference in New Issue
Block a user