From 30847e41a506d46641dd4402840e34c94c14ec45 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Tue, 15 Aug 2023 09:46:17 +0200 Subject: [PATCH] fix(import): use collector --- .../main/java/com/github/libretube/helpers/ImportHelper.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt b/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt index 23ca12351..f6a1d2b32 100644 --- a/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt +++ b/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt @@ -169,7 +169,9 @@ object ImportHelper { ImportFormat.YOUTUBECSV -> { val playlist = PipedImportPlaylist() activity.contentResolver.openInputStream(uri)?.use { - val lines = it.bufferedReader().use { reader -> reader.lines().toList() } + val lines = it.bufferedReader().use { reader -> + reader.lines().collect(Collectors.toList()) + } playlist.name = lines[1].split(",").reversed()[2] var splitIndex = lines.indexOfFirst { line -> line.isBlank() } // seek until playlist items table