From 218f271ba65573b54e370dd5fa9de5512805d679 Mon Sep 17 00:00:00 2001 From: FineFindus Date: Mon, 14 Aug 2023 14:32:59 +0200 Subject: [PATCH] fix(import): use collector --- app/src/main/java/com/github/libretube/helpers/ImportHelper.kt | 3 ++- 1 file changed, 2 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 57e7099b0..23ca12351 100644 --- a/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt +++ b/app/src/main/java/com/github/libretube/helpers/ImportHelper.kt @@ -23,6 +23,7 @@ import kotlin.streams.toList import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.decodeFromStream import kotlinx.serialization.json.encodeToStream +import java.util.stream.Collectors object ImportHelper { /** @@ -79,7 +80,7 @@ object ImportHelper { it.bufferedReader().use { reader -> reader.lines().map { line -> line.substringBefore(",") } .filter { channelId -> channelId.length == 24 } - .toList() + .collect(Collectors.toList()) } }.orEmpty() }