From fdf0414698c50222e5cbd47e501a617c178d36a9 Mon Sep 17 00:00:00 2001 From: sk Date: Fri, 8 Sep 2023 22:05:06 +0200 Subject: [PATCH] fix missing banner icons and wrong strings closes sk22#805 --- .../android/ui/utils/DiscoverInfoBannerHelper.java | 9 ++++++--- mastodon/src/main/res/values/strings_sk.xml | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/DiscoverInfoBannerHelper.java b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/DiscoverInfoBannerHelper.java index 7b4bc4e5d..44c7bd234 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/utils/DiscoverInfoBannerHelper.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/utils/DiscoverInfoBannerHelper.java @@ -10,6 +10,7 @@ import android.widget.TextView; import org.joinmastodon.android.MastodonApp; import org.joinmastodon.android.R; import org.joinmastodon.android.api.session.AccountSessionManager; +import org.joinmastodon.android.model.TimelineDefinition; import java.util.EnumSet; @@ -44,7 +45,7 @@ public class DiscoverInfoBannerHelper{ banner=((Activity)list.getContext()).getLayoutInflater().inflate(R.layout.discover_info_banner, list, false); TextView text=banner.findViewById(R.id.banner_text); text.setText(switch(type){ - case TRENDING_POSTS -> list.getResources().getString(R.string.trending_posts_info_banner); + case TRENDING_POSTS -> list.getResources().getString(R.string.sk_trending_posts_info_banner); case TRENDING_LINKS -> list.getResources().getString(R.string.trending_links_info_banner); case FEDERATED_TIMELINE -> list.getResources().getString(R.string.sk_federated_timeline_info_banner); case POST_NOTIFICATIONS -> list.getResources().getString(R.string.sk_notify_posts_info_banner); @@ -57,8 +58,10 @@ public class DiscoverInfoBannerHelper{ case TRENDING_POSTS -> R.drawable.ic_fluent_arrow_trending_24_regular; case TRENDING_LINKS -> R.drawable.ic_fluent_news_24_regular; case ACCOUNTS -> R.drawable.ic_fluent_people_add_24_regular; - // no icon because those are displayed as timelines - with icon in top left - case LOCAL_TIMELINE, FEDERATED_TIMELINE, BUBBLE_TIMELINE, POST_NOTIFICATIONS -> 0; + case LOCAL_TIMELINE -> TimelineDefinition.LOCAL_TIMELINE.getDefaultIcon().iconRes; + case FEDERATED_TIMELINE -> TimelineDefinition.FEDERATED_TIMELINE.getDefaultIcon().iconRes; + case BUBBLE_TIMELINE -> TimelineDefinition.BUBBLE_TIMELINE.getDefaultIcon().iconRes; + case POST_NOTIFICATIONS -> TimelineDefinition.POSTS_TIMELINE.getDefaultIcon().iconRes; }); adapter.addAdapter(new SingleViewRecyclerAdapter(banner)); } diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml index 3f6251a0f..17f7c76c8 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -33,7 +33,9 @@ Federation These are the most recent posts by the people in your federation. These are the most recent posts from the network curated by your instance admins. - Megalodon %s is ready to download. + These are the posts gaining traction on your server. + These are the news stories getting talked about on your server. + Megalodon %s is ready to download. Megalodon %s is downloaded and ready to install. Check for update No update available