1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-21 18:42:35 +01:00

Some more slight improvements

This commit is contained in:
Stypox 2024-03-28 22:46:19 +01:00
parent 32d2606a65
commit b85f7a6747
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
3 changed files with 5 additions and 10 deletions

View File

@ -26,11 +26,11 @@ public class DescriptionFragment extends BaseDescriptionFragment {
@State @State
StreamInfo streamInfo; StreamInfo streamInfo;
public DescriptionFragment(final StreamInfo streamInfo) { public DescriptionFragment(final StreamInfo streamInfo) {
this.streamInfo = streamInfo; this.streamInfo = streamInfo;
} }
@Nullable @Nullable
@Override @Override
protected Description getDescription() { protected Description getDescription() {

View File

@ -26,10 +26,8 @@ public class ChannelAboutFragment extends BaseDescriptionFragment {
@State @State
protected ChannelInfo channelInfo; protected ChannelInfo channelInfo;
public static ChannelAboutFragment getInstance(final @NonNull ChannelInfo channelInfo) { ChannelAboutFragment(@NonNull final ChannelInfo channelInfo) {
final ChannelAboutFragment fragment = new ChannelAboutFragment(); this.channelInfo = channelInfo;
fragment.channelInfo = channelInfo;
return fragment;
} }
@ -42,10 +40,7 @@ public class ChannelAboutFragment extends BaseDescriptionFragment {
@Nullable @Nullable
@Override @Override
protected Description getDescription() { protected Description getDescription() {
return new Description( return new Description(channelInfo.getDescription(), Description.PLAIN_TEXT);
channelInfo.getDescription(),
Description.PLAIN_TEXT
);
} }
@NonNull @NonNull

View File

@ -474,7 +474,7 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
if (ChannelTabHelper.showChannelTab( if (ChannelTabHelper.showChannelTab(
context, preferences, R.string.show_channel_tabs_about)) { context, preferences, R.string.show_channel_tabs_about)) {
tabAdapter.addFragment( tabAdapter.addFragment(
ChannelAboutFragment.getInstance(currentInfo), new ChannelAboutFragment(currentInfo),
context.getString(R.string.channel_tab_about)); context.getString(R.string.channel_tab_about));
} }
} }