refactor: rename ChannelInfo to ChannelAbout

fix: localize about tab name
This commit is contained in:
ThetaDev 2023-04-05 22:56:25 +02:00 committed by Stypox
parent 25e3031830
commit c03c344f49
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23
6 changed files with 14 additions and 13 deletions

View file

@ -33,7 +33,7 @@ import java.util.List;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
public abstract class BaseInfoFragment extends BaseFragment {
public abstract class BaseDescriptionFragment extends BaseFragment {
final CompositeDisposable descriptionDisposables = new CompositeDisposable();
FragmentDescriptionBinding binding;

View file

@ -20,7 +20,7 @@ import java.util.List;
import icepick.State;
public class DescriptionFragment extends BaseInfoFragment {
public class DescriptionFragment extends BaseDescriptionFragment {
@State
StreamInfo streamInfo = null;

View file

@ -12,24 +12,24 @@ import org.schabi.newpipe.R;
import org.schabi.newpipe.extractor.StreamingService;
import org.schabi.newpipe.extractor.channel.ChannelInfo;
import org.schabi.newpipe.extractor.stream.Description;
import org.schabi.newpipe.fragments.detail.BaseInfoFragment;
import org.schabi.newpipe.fragments.detail.BaseDescriptionFragment;
import org.schabi.newpipe.util.Localization;
import java.util.List;
import icepick.State;
public class ChannelInfoFragment extends BaseInfoFragment {
public class ChannelAboutFragment extends BaseDescriptionFragment {
@State
protected ChannelInfo channelInfo;
public static ChannelInfoFragment getInstance(final ChannelInfo channelInfo) {
final ChannelInfoFragment fragment = new ChannelInfoFragment();
public static ChannelAboutFragment getInstance(final ChannelInfo channelInfo) {
final ChannelAboutFragment fragment = new ChannelAboutFragment();
fragment.channelInfo = channelInfo;
return fragment;
}
public ChannelInfoFragment() {
public ChannelAboutFragment() {
super();
}

View file

@ -301,9 +301,10 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
final String description = currentInfo.getDescription();
if (description != null && !description.isEmpty()
&& ChannelTabHelper.showChannelTab(
context, preferences, R.string.show_channel_tabs_info)) {
context, preferences, R.string.show_channel_tabs_about)) {
tabAdapter.addFragment(
ChannelInfoFragment.getInstance(currentInfo), "Info");
ChannelAboutFragment.getInstance(currentInfo),
context.getString(R.string.channel_tab_about));
}
}
}