Merge branch 'fix/header-follow-protected-account'

This commit is contained in:
sk
2023-03-20 18:28:27 +01:00
3 changed files with 3 additions and 2 deletions

View File

@@ -264,7 +264,7 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
progress.dismiss();
}, rel->{
relationship=rel;
Toast.makeText(activity, activity.getString(rel.following ? R.string.followed_user : R.string.unfollowed_user, account.getShortUsername()), Toast.LENGTH_SHORT).show();
Toast.makeText(activity, activity.getString(rel.following ? R.string.followed_user : rel.requested ? R.string.following_user_requested : R.string.unfollowed_user, account.getDisplayUsername()), Toast.LENGTH_SHORT).show();
});
}else if(id==R.id.block_domain){
UiUtils.confirmToggleBlockDomain(activity, item.parentFragment.getAccountID(), account.getDomain(), relationship!=null && relationship.domainBlocking, ()->{});

View File

@@ -712,7 +712,7 @@ public class UiUtils {
public void onSuccess(Relationship result) {
resultCallback.accept(result);
progressCallback.accept(false);
if (!result.following) {
if(!result.following && !result.requested){
E.post(new RemoveAccountPostsEvent(accountID, account.id, true));
}
}