mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-23 08:30:44 +00:00
Update app/src/main/java/org/schabi/newpipe/fragments/detail/DescriptionFragment.java
Co-authored-by: Stypox <stypox@pm.me>
This commit is contained in:
parent
f1de353b74
commit
e772244440
@ -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.ShareUtils;
|
||||||
import org.schabi.newpipe.util.external_communication.TextLinkifier;
|
import org.schabi.newpipe.util.external_communication.TextLinkifier;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import icepick.State;
|
import icepick.State;
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable;
|
import io.reactivex.rxjava3.disposables.CompositeDisposable;
|
||||||
|
|
||||||
@ -208,16 +205,14 @@ public class DescriptionFragment extends BaseFragment {
|
|||||||
final ItemMetadataTagsBinding itemBinding
|
final ItemMetadataTagsBinding itemBinding
|
||||||
= ItemMetadataTagsBinding.inflate(inflater, layout, false);
|
= ItemMetadataTagsBinding.inflate(inflater, layout, false);
|
||||||
|
|
||||||
final List<String> tags = streamInfo.getTags().stream().sorted()
|
streamInfo.getTags().stream().sorted().forEach(tag -> {
|
||||||
.collect(Collectors.toList());
|
|
||||||
for (final String tag : tags) {
|
|
||||||
final Chip chip = (Chip) inflater.inflate(R.layout.chip,
|
final Chip chip = (Chip) inflater.inflate(R.layout.chip,
|
||||||
itemBinding.metadataTagsChips, false);
|
itemBinding.metadataTagsChips, false);
|
||||||
chip.setText(tag);
|
chip.setText(tag);
|
||||||
chip.setOnClickListener(this::onTagClick);
|
chip.setOnClickListener(this::onTagClick);
|
||||||
chip.setOnLongClickListener(this::onTagLongClick);
|
chip.setOnLongClickListener(this::onTagLongClick);
|
||||||
itemBinding.metadataTagsChips.addView(chip);
|
itemBinding.metadataTagsChips.addView(chip);
|
||||||
}
|
});
|
||||||
|
|
||||||
layout.addView(itemBinding.getRoot());
|
layout.addView(itemBinding.getRoot());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user