Minor bugs fixed.

This commit is contained in:
Alex Ning 2021-11-07 12:09:54 +08:00
parent b059b2d503
commit 23368c89a8
3 changed files with 5 additions and 5 deletions

View File

@ -137,14 +137,14 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit
private void bindView() {
if (privateMessage != null) {
if (privateMessage.getAuthor().equals(mAccountName)) {
mToolbar.setTitle(privateMessage.getDestination());
setTitle(privateMessage.getDestination());
mToolbar.setOnClickListener(view -> {
Intent intent = new Intent(this, ViewUserDetailActivity.class);
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, privateMessage.getDestination());
startActivity(intent);
});
} else {
mToolbar.setTitle(privateMessage.getAuthor());
setTitle(privateMessage.getAuthor());
mToolbar.setOnClickListener(view -> {
Intent intent = new Intent(this, ViewUserDetailActivity.class);
intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, privateMessage.getAuthor());

View File

@ -1022,11 +1022,11 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.view_user_detail_activity, menu);
if(mAccountName.equals(username)){ // Hide some menus
if (username.equals(mAccountName)) {
menu.findItem(R.id.action_send_private_message_view_user_detail_activity).setVisible(false);
menu.findItem(R.id.action_report_view_user_detail_activity).setVisible(false);
menu.findItem(R.id.action_block_user_view_user_detail_activity).setVisible(false);
}else { // Hide Edit Profile menu
} else {
menu.findItem(R.id.action_edit_profile_view_user_detail_activity).setVisible(false);
}
applyMenuItemTheme(menu);

View File

@ -1494,7 +1494,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
imageRequestBuilder.apply(RequestOptions.bitmapTransform(new BlurTransformation(50, 10)))
.into(((PostWithPreviewTypeViewHolder) holder).imageView);
} else {
imageRequestBuilder.override(preview.getPreviewWidth(), preview.getPreviewHeight()).into(((PostWithPreviewTypeViewHolder) holder).imageView);
imageRequestBuilder.override(preview.getPreviewWidth(), preview.getPreviewHeight()).centerInside().into(((PostWithPreviewTypeViewHolder) holder).imageView);
}
}
} else if (holder instanceof PostCompactBaseViewHolder) {