mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
fix: channel tab title not being set
This commit is contained in:
parent
4357a34339
commit
be548dcb52
@ -297,7 +297,7 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
|
||||
final String tab = linkHandler.getContentFilters().get(0);
|
||||
if (ChannelTabHelper.showChannelTab(context, preferences, tab)) {
|
||||
tabAdapter.addFragment(
|
||||
ChannelTabFragment.getInstance(serviceId, linkHandler),
|
||||
ChannelTabFragment.getInstance(serviceId, linkHandler, name),
|
||||
context.getString(ChannelTabHelper.getTranslationKey(tab)));
|
||||
}
|
||||
}
|
||||
|
@ -29,11 +29,16 @@ public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTa
|
||||
@State
|
||||
protected ListLinkHandler tabHandler;
|
||||
|
||||
@State
|
||||
protected String channelName;
|
||||
|
||||
public static ChannelTabFragment getInstance(final int serviceId,
|
||||
final ListLinkHandler tabHandler) {
|
||||
final ListLinkHandler tabHandler,
|
||||
final String channelName) {
|
||||
final ChannelTabFragment instance = new ChannelTabFragment();
|
||||
instance.serviceId = serviceId;
|
||||
instance.tabHandler = tabHandler;
|
||||
instance.channelName = channelName;
|
||||
return instance;
|
||||
}
|
||||
|
||||
@ -70,5 +75,6 @@ public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTa
|
||||
|
||||
@Override
|
||||
public void setTitle(final String title) {
|
||||
super.setTitle(channelName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user