feat(deeplink): add DeeplinkNavigator, DeeplinkBottomSheet and integrate into History and Player
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user