feat(deeplink): add DeeplinkNavigator, DeeplinkBottomSheet and integrate into History and Player

This commit is contained in:
nk
2026-06-01 13:15:31 +03:00
parent aa287f7588
commit ada422053f
4 changed files with 79 additions and 5 deletions

View File

@@ -1,7 +1,5 @@
package com.radiola.ui.player
import android.content.Intent
import android.net.Uri
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
@@ -26,6 +24,7 @@ import com.composables.icons.lucide.Pause
import com.composables.icons.lucide.Play
import com.radiola.domain.model.DeeplinkService
import com.radiola.domain.model.Station
import com.radiola.deeplink.DeeplinkNavigator
import com.radiola.domain.model.Track
@Composable
@@ -97,8 +96,7 @@ fun PlayerBottomSheet(
service = service,
onClick = {
track?.let { t ->
val url = viewModel.getDeeplinkUrl(t, service)
context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)))
DeeplinkNavigator.openSearch(context, t, service)
}
}
)