2
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-08-22 01:58:16 +00:00

Apply Kotlin suggestion by @Isira-Seneviratne

This commit is contained in:
Stypox 2025-07-16 15:07:04 +02:00
parent 3998982002
commit 046ea7301b
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23

View File

@ -1931,12 +1931,8 @@ class VideoDetailFragment :
}
private fun findQueueInStack(queue: PlayQueue): StackItem? {
stack.descendingIterator().forEach { item ->
if (item?.playQueue == queue) {
return@findQueueInStack item
}
}
return null
return stack.descendingIterator().asSequence()
.firstOrNull { it?.playQueue?.equals(queue) == true }
}
private fun replaceQueueIfUserConfirms(onAllow: Runnable) {