From 72c9ce32c0214703f74795ded745e3c0c1cb3b15 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Sat, 28 May 2022 17:37:50 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=B7=BB=E5=8A=A0=E9=98=9F?= =?UTF-8?q?=E5=88=97=E5=90=8E=E5=86=8D=E6=B7=BB=E5=8A=A0=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E4=B8=93=E8=BE=91=E6=97=A0=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nas_music_player/containers/MusicContainer.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java b/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java index 57eac36..5a33f2f 100644 --- a/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java +++ b/app/src/main/java/com/yutou/nas_music_player/containers/MusicContainer.java @@ -30,12 +30,16 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Timer; import java.util.TimerTask; +import java.util.stream.Collectors; +import java.util.stream.Stream; public class MusicContainer { @@ -430,10 +434,10 @@ public class MusicContainer { public List getPlayList() { System.out.println("playList.size() = " + playList.size() + " tmpList.size() = " + tmpList.size()); - if (!tmpList.isEmpty()) { - return tmpList; - } - return playList; + List tmp=new ArrayList<>(); + tmp.addAll(tmpList); + tmp.addAll(playList); + return tmp; }