Skip to content

Commit 89dc44b

Browse files
AudricVStypox
authored andcommitted
Always show the About tab and support having no description
1 parent 6ab8716 commit 89dc44b

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/detail/BaseDescriptionFragment.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,13 @@ private void enableDescriptionSelection() {
129129

130130
private void disableDescriptionSelection() {
131131
// show description content again, otherwise some links are not clickable
132-
TextLinkifier.fromDescription(binding.detailDescriptionView,
133-
getDescription(), HtmlCompat.FROM_HTML_MODE_LEGACY,
134-
getService(), getStreamUrl(),
135-
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
132+
final Description description = getDescription();
133+
if (description != null) {
134+
TextLinkifier.fromDescription(binding.detailDescriptionView,
135+
description, HtmlCompat.FROM_HTML_MODE_LEGACY,
136+
getService(), getStreamUrl(),
137+
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
138+
}
136139

137140
binding.detailDescriptionNoteView.setVisibility(View.GONE);
138141
binding.detailDescriptionView.setTextIsSelectable(false);
@@ -144,10 +147,10 @@ private void disableDescriptionSelection() {
144147
}
145148

146149
protected void addMetadataItem(final LayoutInflater inflater,
147-
final LinearLayout layout,
148-
final boolean linkifyContent,
149-
@StringRes final int type,
150-
@Nullable final String content) {
150+
final LinearLayout layout,
151+
final boolean linkifyContent,
152+
@StringRes final int type,
153+
@Nullable final String content) {
151154
if (isBlank(content)) {
152155
return;
153156
}

app/src/main/java/org/schabi/newpipe/fragments/list/channel/ChannelFragment.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,7 @@ private void updateTabs() {
470470
}
471471
}
472472

473-
final String description = currentInfo.getDescription();
474-
if (description != null && !description.isEmpty()
475-
&& ChannelTabHelper.showChannelTab(
473+
if (ChannelTabHelper.showChannelTab(
476474
context, preferences, R.string.show_channel_tabs_about)) {
477475
tabAdapter.addFragment(
478476
ChannelAboutFragment.getInstance(currentInfo),

0 commit comments

Comments
 (0)