1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-05 17:46:24 +00: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
StreamInfo streamInfo;
public DescriptionFragment(final StreamInfo streamInfo) {
this.streamInfo = streamInfo;
}
@Nullable
@Override
protected Description getDescription() {

View File

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

View File

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