Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
private fun LazyListState.visibleAreaContainsItem(
currentlyPlayedIndex: Int?,
videos: List<VideoItem>
): Boolean {
return when {
currentlyPlayedIndex == null -> false
videos.isEmpty() -> false
else -> { { videos[it.index] }.contains(videos[currentlyPlayedIndex])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment