diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-09-26 13:57:51 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-09-26 13:57:51 +0000 |
commit | 81c259edcb557e231766e17980bf7a20906ee983 (patch) | |
tree | 3dbfabf6512fe933474f8d491a24ae6ef5a8df0d /app/src/main/java | |
parent | 03c97e912efc8a1f4c4df2e82e21ceccf6a4b66d (diff) | |
download | infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar.gz infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar.bz2 infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar.lz infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar.xz infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.tar.zst infinity-for-reddit-81c259edcb557e231766e17980bf7a20906ee983.zip |
Fixed UI issues in dark theme.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/AccountSavedThingActivity.java | 10 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AccountSavedThingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AccountSavedThingActivity.java index ccd56a77..a82a6f7a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AccountSavedThingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AccountSavedThingActivity.java @@ -215,12 +215,11 @@ public class AccountSavedThingActivity extends AppCompatActivity { MenuItem lazyModeItem = mMenu.findItem(R.id.action_lazy_mode_account_saved_thing_activity); if (isInLazyMode) { lazyModeItem.setTitle(R.string.action_stop_lazy_mode); - params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED); + params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL); collapsingToolbarLayout.setLayoutParams(params); } else { lazyModeItem.setTitle(R.string.action_start_lazy_mode); - params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | - AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED); + params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS); collapsingToolbarLayout.setLayoutParams(params); } @@ -245,15 +244,14 @@ public class AccountSavedThingActivity extends AppCompatActivity { isInLazyMode = false; sectionsPagerAdapter.stopLazyMode(); lazyModeItem.setTitle(R.string.action_start_lazy_mode); - params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS | - AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED); + params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_ENTER_ALWAYS); collapsingToolbarLayout.setLayoutParams(params); } else { isInLazyMode = true; if(sectionsPagerAdapter.startLazyMode()) { lazyModeItem.setTitle(R.string.action_stop_lazy_mode); appBarLayout.setExpanded(false); - params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL | AppBarLayout.LayoutParams.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED); + params.setScrollFlags(AppBarLayout.LayoutParams.SCROLL_FLAG_NO_SCROLL); collapsingToolbarLayout.setLayoutParams(params); } else { isInLazyMode = false; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java index d61e9630..c2b420ac 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/PostRecyclerViewAdapter.java @@ -103,8 +103,9 @@ class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView.ViewHo @Override public boolean areContentsTheSame(@NonNull Post post, @NonNull Post t1) { - return post.getTitle().equals(t1.getTitle()) && post.getSelfText().equals(t1.getSelfText()) - && post.getScore() == t1.getScore(); + return post.getTitle().equals(t1.getTitle()) && !(post.getSelfText() != null && t1.getSelfText() != null + && !post.getSelfText().equals(t1.getSelfText())) + && post.getScore() == t1.getScore() && post.getVoteType() == t1.getVoteType(); } }; |