Use stream sorting.

This commit is contained in:
Isira Seneviratne 2022-07-16 08:34:04 +05:30
parent b7a44560f5
commit f1de353b74
2 changed files with 9 additions and 15 deletions

View file

@ -26,9 +26,8 @@ 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.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import icepick.State;
import io.reactivex.rxjava3.disposables.CompositeDisposable;
@ -209,8 +208,8 @@ public class DescriptionFragment extends BaseFragment {
final ItemMetadataTagsBinding itemBinding
= ItemMetadataTagsBinding.inflate(inflater, layout, false);
final List<String> tags = new ArrayList<>(streamInfo.getTags());
Collections.sort(tags);
final List<String> tags = streamInfo.getTags().stream().sorted()
.collect(Collectors.toList());
for (final String tag : tags) {
final Chip chip = (Chip) inflater.inflate(R.layout.chip,
itemBinding.metadataTagsChips, false);