Update ResultViewModel2.kt (#1102)

This commit is contained in:
CranberrySoup 2024-05-27 13:54:51 +00:00 committed by GitHub
parent d0852449a5
commit 960f8449b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1728,7 +1728,7 @@ class ResultViewModel2 : ViewModel() {
txt(R.string.episode_action_cast_mirror) txt(R.string.episode_action_cast_mirror)
) { (result, index) -> ) { (result, index) ->
val host = device?.host ?: return@acquireSingleLink val host = device?.host ?: return@acquireSingleLink
val link = result.links.firstOrNull() ?: return@acquireSingleLink val link = result.links.getOrNull(index) ?: return@acquireSingleLink
FcastSession(host).use { session -> FcastSession(host).use { session ->
session.sendMessage( session.sendMessage(