2
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-08-22 10:09:39 +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? { private fun findQueueInStack(queue: PlayQueue): StackItem? {
stack.descendingIterator().forEach { item -> return stack.descendingIterator().asSequence()
if (item?.playQueue == queue) { .firstOrNull { it?.playQueue?.equals(queue) == true }
return@findQueueInStack item
}
}
return null
} }
private fun replaceQueueIfUserConfirms(onAllow: Runnable) { private fun replaceQueueIfUserConfirms(onAllow: Runnable) {