mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-01-03 14:00:32 +00: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);
|
final String tab = linkHandler.getContentFilters().get(0);
|
||||||
if (ChannelTabHelper.showChannelTab(context, preferences, tab)) {
|
if (ChannelTabHelper.showChannelTab(context, preferences, tab)) {
|
||||||
tabAdapter.addFragment(
|
tabAdapter.addFragment(
|
||||||
ChannelTabFragment.getInstance(serviceId, linkHandler),
|
ChannelTabFragment.getInstance(serviceId, linkHandler, name),
|
||||||
context.getString(ChannelTabHelper.getTranslationKey(tab)));
|
context.getString(ChannelTabHelper.getTranslationKey(tab)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,11 +29,16 @@ public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTa
|
|||||||
@State
|
@State
|
||||||
protected ListLinkHandler tabHandler;
|
protected ListLinkHandler tabHandler;
|
||||||
|
|
||||||
|
@State
|
||||||
|
protected String channelName;
|
||||||
|
|
||||||
public static ChannelTabFragment getInstance(final int serviceId,
|
public static ChannelTabFragment getInstance(final int serviceId,
|
||||||
final ListLinkHandler tabHandler) {
|
final ListLinkHandler tabHandler,
|
||||||
|
final String channelName) {
|
||||||
final ChannelTabFragment instance = new ChannelTabFragment();
|
final ChannelTabFragment instance = new ChannelTabFragment();
|
||||||
instance.serviceId = serviceId;
|
instance.serviceId = serviceId;
|
||||||
instance.tabHandler = tabHandler;
|
instance.tabHandler = tabHandler;
|
||||||
|
instance.channelName = channelName;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -70,5 +75,6 @@ public class ChannelTabFragment extends BaseListInfoFragment<InfoItem, ChannelTa
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setTitle(final String title) {
|
public void setTitle(final String title) {
|
||||||
|
super.setTitle(channelName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user