From 53f5741317ad00d376fd5a514d9e3f134478b7bb Mon Sep 17 00:00:00 2001 From: Jaspann Date: Sat, 25 Dec 2021 18:10:05 -0500 Subject: [PATCH 1/3] Fixes view of sub-channel icon when not in use --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index a5e590ba0..a393804df 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1648,6 +1648,11 @@ public final class VideoDetailFragment binding.detailSubChannelTextView.setVisibility(View.VISIBLE); binding.detailSubChannelTextView.setSelected(true); binding.detailUploaderTextView.setVisibility(View.GONE); + + //No sub-channel name implies no sub-channel icon, but check just to make sure. + if(isEmpty(info.getSubChannelAvatarUrl())){ + binding.detailSubChannelThumbnailView.setVisibility(View.GONE); + } } private void displayBothUploaderAndSubChannel(final StreamInfo info) { From fb3be544ce9902fbd12fdf8fece2d23d7e06634f Mon Sep 17 00:00:00 2001 From: William Parker Date: Sun, 26 Dec 2021 00:12:48 -0500 Subject: [PATCH 2/3] Fixed code styling --- .../schabi/newpipe/fragments/detail/VideoDetailFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index a393804df..20d01c415 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1650,7 +1650,7 @@ public final class VideoDetailFragment binding.detailUploaderTextView.setVisibility(View.GONE); //No sub-channel name implies no sub-channel icon, but check just to make sure. - if(isEmpty(info.getSubChannelAvatarUrl())){ + if (isEmpty(info.getSubChannelAvatarUrl())) { binding.detailSubChannelThumbnailView.setVisibility(View.GONE); } } From 558c9147a2204e53b43a61774a774a0492307a24 Mon Sep 17 00:00:00 2001 From: Jaspann Date: Tue, 28 Dec 2021 15:54:36 -0500 Subject: [PATCH 3/3] Move sub icon visibility line --- .../newpipe/fragments/detail/VideoDetailFragment.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java index 20d01c415..5a74dc948 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java @@ -1521,6 +1521,8 @@ public final class VideoDetailFragment animate(binding.detailThumbnailPlayButton, true, 200); binding.detailVideoTitleView.setText(title); + binding.detailSubChannelThumbnailView.setVisibility(View.GONE); + if (!isEmpty(info.getSubChannelName())) { displayBothUploaderAndSubChannel(info); } else if (!isEmpty(info.getUploaderName())) { @@ -1648,11 +1650,6 @@ public final class VideoDetailFragment binding.detailSubChannelTextView.setVisibility(View.VISIBLE); binding.detailSubChannelTextView.setSelected(true); binding.detailUploaderTextView.setVisibility(View.GONE); - - //No sub-channel name implies no sub-channel icon, but check just to make sure. - if (isEmpty(info.getSubChannelAvatarUrl())) { - binding.detailSubChannelThumbnailView.setVisibility(View.GONE); - } } private void displayBothUploaderAndSubChannel(final StreamInfo info) {