From 6b5e5b0f252ec650030b2b794339eba63c9bb878 Mon Sep 17 00:00:00 2001 From: Grishka Date: Thu, 23 Mar 2023 00:58:38 +0300 Subject: [PATCH] More minor tweaks --- .../FeaturedHashtagsListFragment.java | 2 +- .../fragments/MastodonRecyclerFragment.java | 8 ++++++++ .../fragments/PinnedPostsListFragment.java | 2 +- .../fragments/ProfileFeaturedFragment.java | 15 ++++++++------ .../android/fragments/ProfileFragment.java | 5 +++++ mastodon/src/main/res/drawable/bg_popup.xml | 20 ++++++++++++++----- mastodon/src/main/res/values/strings.xml | 2 -- mastodon/src/main/res/values/styles.xml | 2 ++ 8 files changed, 41 insertions(+), 15 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/FeaturedHashtagsListFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/FeaturedHashtagsListFragment.java index 62417429..61915a3f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/FeaturedHashtagsListFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/FeaturedHashtagsListFragment.java @@ -29,7 +29,7 @@ public class FeaturedHashtagsListFragment extends BaseStatusListFragment(Hashtag)Parcels.unwrap(p)).collect(Collectors.toList()), false); - setTitle(R.string.featured_hashtags); + setTitle(R.string.hashtags); } @Override diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/MastodonRecyclerFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/MastodonRecyclerFragment.java index 6f41877f..f96cbb45 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/MastodonRecyclerFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/MastodonRecyclerFragment.java @@ -4,6 +4,8 @@ import android.os.Bundle; import android.view.View; import android.widget.Toolbar; +import org.joinmastodon.android.R; +import org.joinmastodon.android.ui.utils.UiUtils; import org.joinmastodon.android.utils.ElevationOnScrollListener; import java.util.Collections; @@ -35,6 +37,12 @@ public abstract class MastodonRecyclerFragment extends BaseRecyclerFragment(this){ @Override public void onSuccess(List result){ @@ -150,12 +151,12 @@ public class ProfileFeaturedFragment extends BaseStatusListFragment results=new ArrayList<>(); - if(!pinnedStatuses.isEmpty()){ - SearchResult res=new SearchResult(pinnedStatuses.get(0)); - res.firstInSection=true; + for(int i=0;i sdi && sdi.getItemID().startsWith("post_")){ + super.drawDivider(child, bottomSibling, holder, siblingHolder, parent, c, paint); + } } private void showAllPinnedPosts(){ diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java index cd2f8695..f579efa4 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/ProfileFragment.java @@ -299,6 +299,11 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList return pos+1; }); + int colorBackground=UiUtils.getThemeColor(getActivity(), R.attr.colorM3Background); + int colorPrimary=UiUtils.getThemeColor(getActivity(), R.attr.colorM3Primary); + refreshLayout.setProgressBackgroundColorSchemeColor(UiUtils.alphaBlendColors(colorBackground, colorPrimary, 0.11f)); + refreshLayout.setColorSchemeColors(colorPrimary); + return sizeWrapper; } diff --git a/mastodon/src/main/res/drawable/bg_popup.xml b/mastodon/src/main/res/drawable/bg_popup.xml index d232689d..b1adf556 100644 --- a/mastodon/src/main/res/drawable/bg_popup.xml +++ b/mastodon/src/main/res/drawable/bg_popup.xml @@ -1,6 +1,16 @@ - - - - - \ No newline at end of file + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mastodon/src/main/res/values/strings.xml b/mastodon/src/main/res/values/strings.xml index 400a659b..e2fb87d2 100644 --- a/mastodon/src/main/res/values/strings.xml +++ b/mastodon/src/main/res/values/strings.xml @@ -447,7 +447,5 @@ Timeline View all Accounts - Pinned posts - Featured hashtags Verified link \ No newline at end of file diff --git a/mastodon/src/main/res/values/styles.xml b/mastodon/src/main/res/values/styles.xml index acef71ff..c110344c 100644 --- a/mastodon/src/main/res/values/styles.xml +++ b/mastodon/src/main/res/values/styles.xml @@ -71,6 +71,7 @@ ?colorM3Background @color/navigation_bar_bg_light ?colorM3Primary + @color/m3_primary_overlay