Always show the About tab and support having no description
This commit is contained in:
parent
6ab8716e69
commit
89dc44be61
|
@ -129,10 +129,13 @@ public abstract class BaseDescriptionFragment extends BaseFragment {
|
||||||
|
|
||||||
private void disableDescriptionSelection() {
|
private void disableDescriptionSelection() {
|
||||||
// show description content again, otherwise some links are not clickable
|
// show description content again, otherwise some links are not clickable
|
||||||
TextLinkifier.fromDescription(binding.detailDescriptionView,
|
final Description description = getDescription();
|
||||||
getDescription(), HtmlCompat.FROM_HTML_MODE_LEGACY,
|
if (description != null) {
|
||||||
getService(), getStreamUrl(),
|
TextLinkifier.fromDescription(binding.detailDescriptionView,
|
||||||
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
|
description, HtmlCompat.FROM_HTML_MODE_LEGACY,
|
||||||
|
getService(), getStreamUrl(),
|
||||||
|
descriptionDisposables, SET_LINK_MOVEMENT_METHOD);
|
||||||
|
}
|
||||||
|
|
||||||
binding.detailDescriptionNoteView.setVisibility(View.GONE);
|
binding.detailDescriptionNoteView.setVisibility(View.GONE);
|
||||||
binding.detailDescriptionView.setTextIsSelectable(false);
|
binding.detailDescriptionView.setTextIsSelectable(false);
|
||||||
|
@ -144,10 +147,10 @@ public abstract class BaseDescriptionFragment extends BaseFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addMetadataItem(final LayoutInflater inflater,
|
protected void addMetadataItem(final LayoutInflater inflater,
|
||||||
final LinearLayout layout,
|
final LinearLayout layout,
|
||||||
final boolean linkifyContent,
|
final boolean linkifyContent,
|
||||||
@StringRes final int type,
|
@StringRes final int type,
|
||||||
@Nullable final String content) {
|
@Nullable final String content) {
|
||||||
if (isBlank(content)) {
|
if (isBlank(content)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -470,9 +470,7 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final String description = currentInfo.getDescription();
|
if (ChannelTabHelper.showChannelTab(
|
||||||
if (description != null && !description.isEmpty()
|
|
||||||
&& 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),
|
ChannelAboutFragment.getInstance(currentInfo),
|
||||||
|
|
Loading…
Reference in New Issue