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.linkhandler.ListLinkHandler;
|
||||
import org.schabi.newpipe.fragments.list.BaseListInfoFragment;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.ExtractorHelper;
|
||||
|
||||
import icepick.State;
|
||||
|
@ -23,12 +22,8 @@ import io.reactivex.rxjava3.core.Single;
|
|||
|
||||
public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTabInfo> {
|
||||
|
||||
@State
|
||||
protected int serviceId = Constants.NO_SERVICE_ID;
|
||||
|
||||
@State
|
||||
protected ListLinkHandler tabHandler;
|
||||
|
||||
@State
|
||||
protected String channelName;
|
||||
|
||||
|
|
|
@ -27,8 +27,9 @@ public final class ChannelTabHelper {
|
|||
case ChannelTabs.SHORTS:
|
||||
case ChannelTabs.LIVESTREAMS:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,8 +62,9 @@ public final class ChannelTabHelper {
|
|||
return R.string.show_channel_tabs_playlists;
|
||||
case ChannelTabs.ALBUMS:
|
||||
return R.string.show_channel_tabs_albums;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@StringRes
|
||||
|
@ -82,8 +84,9 @@ public final class ChannelTabHelper {
|
|||
return R.string.channel_tab_playlists;
|
||||
case ChannelTabs.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,
|
||||
|
|
Loading…
Reference in New Issue