Add description

This commit is contained in:
tom79 2020-02-01 12:22:22 +01:00
parent 8ad8bee677
commit 82be9f0bc7
2 changed files with 7 additions and 0 deletions

View File

@ -978,15 +978,18 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
account_follow.setImageResource(R.drawable.ic_lock_open);
doAction = action.UNBLOCK;
account_follow.setVisibility(View.VISIBLE);
account_follow.setContentDescription(getString(R.string.action_unblock));
} else if (relationship.isBlocked_by()) {
account_follow.setImageResource(R.drawable.ic_user_plus);
account_follow.setVisibility(View.VISIBLE);
account_follow.setEnabled(false);
account_follow.setContentDescription(getString(R.string.action_disabled));
doAction = action.NOTHING;
}else if (relationship.isRequested()) {
account_follow_request.setVisibility(View.VISIBLE);
account_follow.setImageResource(R.drawable.ic_hourglass_full);
account_follow.setVisibility(View.VISIBLE);
account_follow.setContentDescription(getString(R.string.follow_request));
doAction = action.UNFOLLOW;
} else if (relationship.isFollowing()) {
account_follow.setImageResource(R.drawable.ic_user_minus);
@ -994,11 +997,13 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
account_follow.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(ShowAccountActivity.this, R.color.red_1)));
}
doAction = action.UNFOLLOW;
account_follow.setContentDescription(getString(R.string.action_unfollow));
account_follow.setVisibility(View.VISIBLE);
} else if (!relationship.isFollowing()) {
account_follow.setImageResource(R.drawable.ic_user_plus);
doAction = action.FOLLOW;
account_follow.setVisibility(View.VISIBLE);
account_follow.setContentDescription(getString(R.string.action_follow));
} else {
account_follow.setVisibility(View.GONE);
doAction = action.NOTHING;

View File

@ -1218,4 +1218,6 @@
<string name="pixelfed_story">It is a Pixelfed story</string>
<string name="story_indication">Upload a media, it will be automatically added to your Pixelfed story.</string>
<string name="added_to_story">Media successfully added to your story!</string>
<string name="action_disabled">Action disabled</string>
<string name="action_unfollow">Unfollow</string>
</resources>