aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-11-07 04:09:54 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-11-07 04:09:54 +0000
commit23368c89a86f7bd7c65ae7492efa82ec9a0ad152 (patch)
tree71faca213189e758608b85d6af4e2d8ac330d286 /app/src/main/java/ml/docilealligator/infinityforreddit
parentb059b2d5033f41859b538abf954cfd1c9e9f7d75 (diff)
downloadinfinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar.gz
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar.bz2
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar.lz
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar.xz
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.tar.zst
infinity-for-reddit-23368c89a86f7bd7c65ae7492efa82ec9a0ad152.zip
Minor bugs fixed.
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java4
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java2
3 files changed, 5 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java
index f56bf406..a9571923 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewPrivateMessagesActivity.java
@@ -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());
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
index 7010c8e3..2c41ba96 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java
@@ -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);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index 493045f1..2c23649e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -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) {