Fix some code smells
This commit is contained in:
parent
a1e8b9be4e
commit
371f986773
|
@ -15,7 +15,6 @@ import org.schabi.newpipe.extractor.ListExtractor;
|
||||||
import org.schabi.newpipe.extractor.channel.ChannelTabInfo;
|
import org.schabi.newpipe.extractor.channel.ChannelTabInfo;
|
||||||
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
|
||||||
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
|
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
|
||||||
import org.schabi.newpipe.util.Constants;
|
|
||||||
import org.schabi.newpipe.util.ExtractorHelper;
|
import org.schabi.newpipe.util.ExtractorHelper;
|
||||||
|
|
||||||
import icepick.State;
|
import icepick.State;
|
||||||
|
@ -23,12 +22,8 @@ import io.reactivex.rxjava3.core.Single;
|
||||||
|
|
||||||
public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTabInfo> {
|
public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTabInfo> {
|
||||||
|
|
||||||
@State
|
|
||||||
protected int serviceId = Constants.NO_SERVICE_ID;
|
|
||||||
|
|
||||||
@State
|
@State
|
||||||
protected ListLinkHandler tabHandler;
|
protected ListLinkHandler tabHandler;
|
||||||
|
|
||||||
@State
|
@State
|
||||||
protected String channelName;
|
protected String channelName;
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,9 @@ public final class ChannelTabHelper {
|
||||||
case ChannelTabs.SHORTS:
|
case ChannelTabs.SHORTS:
|
||||||
case ChannelTabs.LIVESTREAMS:
|
case ChannelTabs.LIVESTREAMS:
|
||||||
return true;
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -61,8 +62,9 @@ public final class ChannelTabHelper {
|
||||||
return R.string.show_channel_tabs_playlists;
|
return R.string.show_channel_tabs_playlists;
|
||||||
case ChannelTabs.ALBUMS:
|
case ChannelTabs.ALBUMS:
|
||||||
return R.string.show_channel_tabs_albums;
|
return R.string.show_channel_tabs_albums;
|
||||||
|
default:
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@StringRes
|
@StringRes
|
||||||
|
@ -82,8 +84,9 @@ public final class ChannelTabHelper {
|
||||||
return R.string.channel_tab_playlists;
|
return R.string.channel_tab_playlists;
|
||||||
case ChannelTabs.ALBUMS:
|
case ChannelTabs.ALBUMS:
|
||||||
return R.string.channel_tab_albums;
|
return R.string.channel_tab_albums;
|
||||||
|
default:
|
||||||
|
return R.string.unknown_content;
|
||||||
}
|
}
|
||||||
return R.string.unknown_content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean showChannelTab(final Context context,
|
public static boolean showChannelTab(final Context context,
|
||||||
|
|
Loading…
Reference in New Issue