refactor: rename ChannelInfo to ChannelAbout
fix: localize about tab name
This commit is contained in:
parent
25e3031830
commit
c03c344f49
6 changed files with 14 additions and 13 deletions
|
|
@ -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;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue