mirror of
https://github.com/FluxaMedia/fluxa.git
synced 2026-08-09 08:27:32 +00:00
Use Apple platform services in shared host
This commit is contained in:
parent
d2d075ed6b
commit
dabcbc39c2
2 changed files with 8 additions and 1 deletions
|
|
@ -5,10 +5,12 @@ import androidx.compose.ui.window.ComposeUIViewController
|
|||
import com.fluxa.app.shared.feature.catalog.CatalogAction
|
||||
import com.fluxa.app.shared.feature.catalog.CatalogHomeUiState
|
||||
import com.fluxa.app.shared.platform.AppleCatalogHomeDataSource
|
||||
import com.fluxa.app.shared.platform.AppleFluxaPlatformServices
|
||||
import platform.UIKit.UIViewController
|
||||
|
||||
object FluxaApple {
|
||||
internal val catalogHomeDataSource = AppleCatalogHomeDataSource()
|
||||
internal val platformServices = AppleFluxaPlatformServices(catalogHomeDataSource)
|
||||
|
||||
fun rootViewController(): UIViewController = ComposeUIViewController {
|
||||
FluxaAppleApp()
|
||||
|
|
@ -22,7 +24,7 @@ object FluxaApple {
|
|||
@Composable
|
||||
private fun FluxaAppleApp() {
|
||||
FluxaAppHost(
|
||||
catalogHomeDataSource = FluxaApple.catalogHomeDataSource,
|
||||
platformServices = FluxaApple.platformServices,
|
||||
onCatalogAction = { action ->
|
||||
when (action) {
|
||||
CatalogAction.Refresh,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
package com.fluxa.app.shared.platform
|
||||
|
||||
class AppleFluxaPlatformServices(
|
||||
override val catalogHomeDataSource: AppleCatalogHomeDataSource
|
||||
) : FluxaPlatformServices
|
||||
Loading…
Reference in a new issue