From fb525d62ed630c9731a4704ad3b9848b0fc10752 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 27 Feb 2019 13:15:32 +0800 Subject: Don't draw under display cutouts in landscape mode (API >= 28). --- .../SubredditListingRecyclerViewAdapter.java | 4 +--- .../infinityforreddit/UserListingRecyclerViewAdapter.java | 14 +++++++------- 2 files changed, 8 insertions(+), 10 deletions(-) (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java index 1113acd3..ad27c1b9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubredditListingRecyclerViewAdapter.java @@ -3,7 +3,6 @@ package ml.docilealligator.infinityforreddit; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -102,8 +101,7 @@ public class SubredditListingRecyclerViewAdapter extends PagedListAdapter { Intent intent = new Intent(context, ViewUserDetailActivity.class); - intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, UserData.getName()); + intent.putExtra(ViewUserDetailActivity.EXTRA_USER_NAME_KEY, userData.getName()); context.startActivity(intent); }); - if(UserData.getIconUrl() != null) { - glide.load(UserData.getIconUrl()) + if(!userData.getIconUrl().equals("")) { + glide.load(userData.getIconUrl()) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0))) .error(glide.load(R.drawable.subreddit_default_icon) .apply(RequestOptions.bitmapTransform(new RoundedCornersTransformation(72, 0)))) @@ -113,9 +113,9 @@ public class UserListingRecyclerViewAdapter extends PagedListAdapter { UserFollowing.followUser(oauthRetrofit, retrofit, - authInfoSharedPreferences, UserData.getName(), subscribedUserDao, + authInfoSharedPreferences, userData.getName(), subscribedUserDao, new UserFollowing.UserFollowingListener() { @Override public void onUserFollowingSuccess() { -- cgit v1.2.3