Change feed groups header title and icon from feed representing "All"

This commit is contained in:
Mauricio Colli 2019-10-11 01:09:28 -03:00
parent e1eb50c241
commit a73b752fa2
65 changed files with 84 additions and 85 deletions

View file

@ -27,8 +27,6 @@ import android.view.*
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import icepick.State
import io.reactivex.Completable
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.error_retry.*
import kotlinx.android.synthetic.main.fragment_feed.*
import org.schabi.newpipe.R
@ -105,7 +103,7 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
super.onCreateOptionsMenu(menu, inflater)
activity.supportActionBar?.setTitle(R.string.fragment_whats_new)
activity.supportActionBar?.setTitle(R.string.fragment_feed_title)
activity.supportActionBar?.subtitle = groupName
}

View file

@ -53,7 +53,8 @@ enum class FeedGroupIcon(
PETS(33, R.attr.ic_pets),
WORLD(34, R.attr.ic_world),
STAR(35, R.attr.ic_stars),
SUN(36, R.attr.ic_sunny);
SUN(36, R.attr.ic_sunny),
RSS(37, R.attr.rss);
@DrawableRes
fun getDrawableRes(context: Context): Int {

View file

@ -191,7 +191,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
Section().apply {
val carouselAdapter = GroupAdapter<GroupieViewHolder>()
carouselAdapter.add(FeedGroupCardItem(-1, getString(R.string.all), FeedGroupIcon.ALL))
carouselAdapter.add(FeedGroupCardItem(-1, getString(R.string.all), FeedGroupIcon.RSS))
carouselAdapter.add(feedGroupsSection)
carouselAdapter.add(FeedGroupAddItem())
@ -209,7 +209,7 @@ class SubscriptionFragment : BaseStateFragment<SubscriptionState>() {
}
feedGroupsCarousel = FeedGroupCarouselItem(requireContext(), carouselAdapter)
add(Section(HeaderItem(getString(R.string.fragment_whats_new)), listOf(feedGroupsCarousel)))
add(Section(HeaderItem(getString(R.string.feed_groups_header_title)), listOf(feedGroupsCarousel)))
groupAdapter.add(this)
}