From e77224444051323fe506b350ebd4df5546ca4de2 Mon Sep 17 00:00:00 2001 From: Isira Seneviratne <31027858+Isira-Seneviratne@users.noreply.github.com> Date: Tue, 19 Jul 2022 05:10:51 +0530 Subject: [PATCH] Update app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java Co-authored-by: Stypox --- .../newpipe/fragments/detail/DescriptionFragment.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java index 362388314..ab4883768 100644 --- a/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java +++ b/app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java @@ -26,9 +26,6 @@ import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.external_communication.ShareUtils; import org.schabi.newpipe.util.external_communication.TextLinkifier; -import java.util.List; -import java.util.stream.Collectors; - import icepick.State; import io.reactivex.rxjava3.disposables.CompositeDisposable; @@ -208,16 +205,14 @@ public class DescriptionFragment extends BaseFragment { final ItemMetadataTagsBinding itemBinding = ItemMetadataTagsBinding.inflate(inflater, layout, false); - final List tags = streamInfo.getTags().stream().sorted() - .collect(Collectors.toList()); - for (final String tag : tags) { + streamInfo.getTags().stream().sorted().forEach(tag -> { final Chip chip = (Chip) inflater.inflate(R.layout.chip, itemBinding.metadataTagsChips, false); chip.setText(tag); chip.setOnClickListener(this::onTagClick); chip.setOnLongClickListener(this::onTagLongClick); itemBinding.metadataTagsChips.addView(chip); - } + }); layout.addView(itemBinding.getRoot()); }