From d3bf87e741081a4dd7b53c9975518be6d6454d21 Mon Sep 17 00:00:00 2001 From: stslex Date: Sun, 8 Dec 2024 20:28:01 +0300 Subject: [PATCH] init mvi module --- commonApp/build.gradle.kts | 1 + .../core/coroutine/AppCoroutineScopeImpl.kt | 5 ++--- .../core/ui/kit/mvi/StoreExt.android.kt | 16 --------------- .../wizard/core/ui/kit/mvi/StoreExt.ios.kt | 15 -------------- core/ui/mvi/build.gradle.kts | 12 +++++++++++ .../ui/mvi/store_di}/ViewModelBean.android.kt | 4 ++-- .../stslex/wizard/core/ui}/mvi/BaseStore.kt | 20 ++++--------------- .../wizard/core/ui}/mvi/CommonEvents.kt | 2 +- .../com/stslex/wizard/core/ui}/mvi/Router.kt | 3 ++- .../com/stslex/wizard/core/ui}/mvi/Store.kt | 8 ++++---- .../wizard/core/ui/mvi/store_di}/StoreBean.kt | 4 ++-- .../core/ui/mvi/store_di/StoreCreation.kt} | 12 ++--------- .../core/ui/mvi/store_di}/ViewModelBean.kt | 2 +- .../ui/mvi/store_di}/ViewModelBean.ios.kt | 2 +- feature/auth/build.gradle.kts | 1 + .../feature/auth/di/ModuleFeatureAuth.kt | 2 +- .../feature/auth/navigation/AuthGraph.kt | 2 +- .../feature/auth/navigation/AuthRouter.kt | 2 +- .../wizard/feature/auth/ui/store/AuthStore.kt | 4 ++-- .../feature/auth/ui/store/AuthStoreImpl.kt | 4 ++-- feature/favourite/build.gradle.kts | 1 + .../favourite/di/ModuleFeatureFavourite.kt | 2 +- .../favourite/navigation/FavouriteGraph.kt | 2 +- .../favourite/navigation/FavouriteRouter.kt | 2 +- .../favourite/ui/store/FavouriteStore.kt | 4 ++-- .../favourite/ui/store/FavouriteStoreImpl.kt | 4 ++-- feature/film/build.gradle.kts | 1 + .../feature/film/di/ModuleFeatureFilm.kt | 4 +++- .../feature/film/navigation/FilmRouter.kt | 2 +- .../feature/film/navigation/GraphFilm.kt | 2 +- .../wizard/feature/film/ui/store/FilmStore.kt | 2 +- .../feature/film/ui/store/FilmStoreImpl.kt | 2 +- feature/film_feed/build.gradle.kts | 1 + .../feature/film_feed/di/ModuleFeatureFeed.kt | 2 +- .../film_feed/navigation/FeedScreenRouter.kt | 2 +- .../film_feed/navigation/GraphFilmFeed.kt | 2 +- .../feature/film_feed/ui/store/FeedStore.kt | 2 +- .../film_feed/ui/store/FeedStoreImpl.kt | 2 +- feature/follower/build.gradle.kts | 1 + .../follower/di/ModuleFeatureFollower.kt | 2 +- .../follower/navigation/FollowerRouter.kt | 2 +- .../follower/navigation/GraphFollower.kt | 2 +- .../follower/ui/store/FollowerStore.kt | 4 ++-- .../follower/ui/store/FollowerStoreImpl.kt | 4 ++-- feature/match/build.gradle.kts | 1 + .../feature/match/di/ModuleFeatureMatch.kt | 2 +- .../feature/match/navigation/GraphMatch.kt | 2 +- .../feature/match/navigation/MatchRouter.kt | 2 +- .../feature/match/ui/store/MatchStore.kt | 4 ++-- .../feature/match/ui/store/MatchStoreImpl.kt | 4 ++-- feature/match_feed/build.gradle.kts | 1 + .../match_feed/di/ModuleFeatureMatchFeed.kt | 2 +- .../match_feed/navigation/GraphMatchFeed.kt | 2 +- .../match_feed/navigation/MatchFeedRouter.kt | 2 +- .../match_feed/ui/store/MatchFeedStore.kt | 2 +- .../match_feed/ui/store/MatchFeedStoreImpl.kt | 2 +- feature/profile/build.gradle.kts | 1 + .../profile/di/ModuleFeatureProfile.kt | 2 +- .../profile/navigation/GraphProfile.kt | 2 +- .../profile/navigation/ProfileRouter.kt | 2 +- .../feature/profile/ui/store/ProfileStore.kt | 4 ++-- .../profile/ui/store/ProfileStoreImpl.kt | 4 ++-- feature/settings/build.gradle.kts | 1 + .../settings/di/ModuleFeatureSettings.kt | 2 +- .../settings/navigation/GraphSettings.kt | 2 +- .../settings/navigation/SettingsRouter.kt | 2 +- .../settings/ui/store/SettingsStore.kt | 4 ++-- .../settings/ui/store/SettingsStoreImpl.kt | 4 ++-- settings.gradle.kts | 1 + 69 files changed, 103 insertions(+), 129 deletions(-) delete mode 100644 core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.android.kt delete mode 100644 core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.ios.kt create mode 100644 core/ui/mvi/build.gradle.kts rename core/ui/{kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel => mvi/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di}/ViewModelBean.android.kt (94%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui}/mvi/BaseStore.kt (85%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui}/mvi/CommonEvents.kt (97%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui}/mvi/Router.kt (68%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui}/mvi/Store.kt (79%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di}/StoreBean.kt (94%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.kt => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreCreation.kt} (52%) rename core/ui/{kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel => mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di}/ViewModelBean.kt (96%) rename core/ui/{kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel => mvi/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di}/ViewModelBean.ios.kt (97%) diff --git a/commonApp/build.gradle.kts b/commonApp/build.gradle.kts index 6d5180f..6d0791d 100644 --- a/commonApp/build.gradle.kts +++ b/commonApp/build.gradle.kts @@ -10,6 +10,7 @@ kotlin { implementation(project(":core:network:api")) implementation(project(":core:database")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:navigation")) implementation(project(":feature:film_feed")) diff --git a/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt index 2ba05ba..955cad5 100644 --- a/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt +++ b/core/core/src/commonMain/kotlin/com/stslex/wizard/core/core/coroutine/AppCoroutineScopeImpl.kt @@ -10,9 +10,8 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -class AppCoroutineScopeImpl( - private val scope: CoroutineScope, -) : AppCoroutineScope { +// todo: add dispatchers from di +class AppCoroutineScopeImpl(private val scope: CoroutineScope) : AppCoroutineScope { private fun exceptionHandler( eachDispatcher: CoroutineDispatcher, diff --git a/core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.android.kt b/core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.android.kt deleted file mode 100644 index 93f7f4e..0000000 --- a/core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.android.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.stslex.wizard.core.ui.kit.mvi - -import androidx.lifecycle.ViewModel -import org.koin.androidx.viewmodel.dsl.viewModel -import org.koin.core.definition.Definition -import org.koin.core.definition.KoinDefinition -import org.koin.core.module.Module -import org.koin.core.qualifier.Qualifier - -actual inline fun Module.viewModelDefinition( - qualifier: Qualifier?, - noinline definition: Definition, -): KoinDefinition = viewModel( - qualifier = qualifier, - definition = definition -) diff --git a/core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.ios.kt b/core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.ios.kt deleted file mode 100644 index 9202688..0000000 --- a/core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.ios.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.stslex.wizard.core.ui.kit.mvi - -import androidx.lifecycle.ViewModel -import org.koin.core.definition.Definition -import org.koin.core.definition.KoinDefinition -import org.koin.core.module.Module -import org.koin.core.qualifier.Qualifier - -actual inline fun Module.viewModelDefinition( - qualifier: Qualifier?, - noinline definition: Definition, -): KoinDefinition = factory( - qualifier = qualifier, - definition = definition -) \ No newline at end of file diff --git a/core/ui/mvi/build.gradle.kts b/core/ui/mvi/build.gradle.kts new file mode 100644 index 0000000..b0ba64a --- /dev/null +++ b/core/ui/mvi/build.gradle.kts @@ -0,0 +1,12 @@ +plugins { + alias(libs.plugins.convention.kmp.library.compose) +} + +kotlin { + sourceSets { + commonMain.dependencies { + implementation(project(":core:core")) + implementation(project(":core:ui:kit")) + } + } +} \ No newline at end of file diff --git a/core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.android.kt b/core/ui/mvi/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.android.kt similarity index 94% rename from core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.android.kt rename to core/ui/mvi/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.android.kt index 5b0b673..442c06d 100644 --- a/core/ui/kit/src/androidMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.android.kt +++ b/core/ui/mvi/src/androidMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.android.kt @@ -1,10 +1,10 @@ -package com.stslex.wizard.core.ui.kit.viewModel +package com.stslex.wizard.core.ui.mvi.store_di import androidx.lifecycle.ViewModel -import org.koin.androidx.viewmodel.dsl.viewModelOf import org.koin.core.definition.BeanDefinition import org.koin.core.definition.KoinDefinition import org.koin.core.module.Module +import org.koin.core.module.dsl.viewModelOf actual inline fun Module.viewModelOf( crossinline constructor: () -> R, diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/BaseStore.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/BaseStore.kt similarity index 85% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/BaseStore.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/BaseStore.kt index 26d104b..9ed385a 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/BaseStore.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/BaseStore.kt @@ -1,18 +1,15 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.stslex.wizard.core.core.AppDispatcher import com.stslex.wizard.core.core.AppDispatcherImpl -import com.stslex.wizard.core.core.Logger import com.stslex.wizard.core.core.coroutine.AppCoroutineScope import com.stslex.wizard.core.core.coroutine.AppCoroutineScopeImpl -import com.stslex.wizard.core.core.coroutineExceptionHandler -import com.stslex.wizard.core.ui.kit.mvi.Store.Action -import com.stslex.wizard.core.ui.kit.mvi.Store.Event -import com.stslex.wizard.core.ui.kit.mvi.Store.State +import com.stslex.wizard.core.ui.mvi.Store.Action +import com.stslex.wizard.core.ui.mvi.Store.Event +import com.stslex.wizard.core.ui.mvi.Store.State import kotlinx.coroutines.CoroutineDispatcher -import kotlinx.coroutines.CoroutineExceptionHandler import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.flow.Flow @@ -50,15 +47,6 @@ abstract class BaseStore(initialState: S) : Vi /** Process the action. This method should be overridden in the child class.*/ protected abstract fun process(action: A) - private fun exceptionHandler( - onError: suspend (cause: Throwable) -> Unit = {}, - ) = CoroutineExceptionHandler { _, throwable -> - Logger.e(throwable) - viewModelScope.launch(coroutineExceptionHandler) { - onError(throwable) - } - } - /** * Updates the state of the screen. * @param update - function that updates the state diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/CommonEvents.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/CommonEvents.kt similarity index 97% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/CommonEvents.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/CommonEvents.kt index db341a1..32c8727 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/CommonEvents.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/CommonEvents.kt @@ -1,4 +1,4 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi import androidx.compose.material3.SnackbarDuration import androidx.compose.runtime.Stable diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Router.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt similarity index 68% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Router.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt index fc36422..9e772ff 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Router.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Router.kt @@ -1,5 +1,6 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi fun interface Router { + operator fun invoke(event: E) } diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Store.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt similarity index 79% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Store.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt index 6f1815c..1496c78 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/Store.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/Store.kt @@ -1,8 +1,8 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi -import com.stslex.wizard.core.ui.kit.mvi.Store.Action -import com.stslex.wizard.core.ui.kit.mvi.Store.Event -import com.stslex.wizard.core.ui.kit.mvi.Store.State +import com.stslex.wizard.core.ui.mvi.Store.Action +import com.stslex.wizard.core.ui.mvi.Store.Event +import com.stslex.wizard.core.ui.mvi.Store.State import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreBean.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreBean.kt similarity index 94% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreBean.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreBean.kt index 68b7a4e..5f859b0 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreBean.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreBean.kt @@ -1,6 +1,6 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi.store_di -import com.stslex.wizard.core.ui.kit.viewModel.viewModelOf +import com.stslex.wizard.core.ui.mvi.BaseStore import org.koin.core.definition.BeanDefinition import org.koin.core.definition.KoinDefinition import org.koin.core.module.Module diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreCreation.kt similarity index 52% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreCreation.kt index 84c136c..57ccb7e 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/mvi/StoreExt.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/StoreCreation.kt @@ -1,19 +1,11 @@ -package com.stslex.wizard.core.ui.kit.mvi +package com.stslex.wizard.core.ui.mvi.store_di import androidx.compose.runtime.Composable -import androidx.lifecycle.ViewModel +import com.stslex.wizard.core.ui.mvi.Store import org.koin.compose.koinInject -import org.koin.core.definition.Definition -import org.koin.core.definition.KoinDefinition -import org.koin.core.module.Module import org.koin.core.parameter.ParametersDefinition import org.koin.core.qualifier.Qualifier -expect inline fun Module.viewModelDefinition( - qualifier: Qualifier? = null, - noinline definition: Definition -): KoinDefinition - @Composable inline fun > getStore( qualifier: Qualifier? = null, diff --git a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.kt b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.kt similarity index 96% rename from core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.kt rename to core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.kt index 6212637..237049d 100644 --- a/core/ui/kit/src/commonMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.kt +++ b/core/ui/mvi/src/commonMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.kt @@ -1,4 +1,4 @@ -package com.stslex.wizard.core.ui.kit.viewModel +package com.stslex.wizard.core.ui.mvi.store_di import androidx.lifecycle.ViewModel import org.koin.core.definition.BeanDefinition diff --git a/core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.ios.kt b/core/ui/mvi/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.ios.kt similarity index 97% rename from core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.ios.kt rename to core/ui/mvi/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.ios.kt index 4bd564c..d741733 100644 --- a/core/ui/kit/src/iosMain/kotlin/com/stslex/wizard/core/ui/kit/viewModel/ViewModelBean.ios.kt +++ b/core/ui/mvi/src/iosMain/kotlin/com/stslex/wizard/core/ui/mvi/store_di/ViewModelBean.ios.kt @@ -1,4 +1,4 @@ -package com.stslex.wizard.core.ui.kit.viewModel +package com.stslex.wizard.core.ui.mvi.store_di import androidx.lifecycle.ViewModel import org.koin.core.definition.BeanDefinition diff --git a/feature/auth/build.gradle.kts b/feature/auth/build.gradle.kts index 1fe2d80..5e4acf8 100644 --- a/feature/auth/build.gradle.kts +++ b/feature/auth/build.gradle.kts @@ -7,6 +7,7 @@ kotlin { commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:navigation")) implementation(project(":core:network:api")) implementation(project(":core:database")) diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/ModuleFeatureAuth.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/ModuleFeatureAuth.kt index dd00146..66e0a8e 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/ModuleFeatureAuth.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/di/ModuleFeatureAuth.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.auth.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.auth.data.AuthRepository import com.stslex.wizard.feature.auth.data.AuthRepositoryImpl import com.stslex.wizard.feature.auth.domain.AuthInteractor diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthGraph.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthGraph.kt index eeaf93f..a14ffba 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthGraph.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthGraph.kt @@ -8,7 +8,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.auth.ui.AuthScreen import com.stslex.wizard.feature.auth.ui.model.screen.rememberAuthScreenState import com.stslex.wizard.feature.auth.ui.store.AuthStore diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt index 850ae95..db1d673 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/navigation/AuthRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.auth.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.auth.ui.store.AuthStore interface AuthRouter : Router \ No newline at end of file diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt index 60f191e..74c8a1b 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStore.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.auth.ui.store -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.auth.ui.store.AuthStore.Action import com.stslex.wizard.feature.auth.ui.store.AuthStore.Event import com.stslex.wizard.feature.auth.ui.store.AuthStore.State diff --git a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreImpl.kt b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreImpl.kt index dabd498..62063d3 100644 --- a/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreImpl.kt +++ b/feature/auth/src/commonMain/kotlin/com/stslex/wizard/feature/auth/ui/store/AuthStoreImpl.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.auth.ui.store -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.feature.auth.domain.AuthInteractor import com.stslex.wizard.feature.auth.navigation.AuthRouter import com.stslex.wizard.feature.auth.ui.store.AuthStore.Action diff --git a/feature/favourite/build.gradle.kts b/feature/favourite/build.gradle.kts index 42dfd8b..9e684f3 100644 --- a/feature/favourite/build.gradle.kts +++ b/feature/favourite/build.gradle.kts @@ -6,6 +6,7 @@ kotlin { sourceSets.commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:navigation")) } diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/ModuleFeatureFavourite.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/ModuleFeatureFavourite.kt index 7d86b9e..4dad048 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/ModuleFeatureFavourite.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/di/ModuleFeatureFavourite.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.favourite.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.favourite.data.repository.FavouriteRepository import com.stslex.wizard.feature.favourite.data.repository.FavouriteRepositoryImpl import com.stslex.wizard.feature.favourite.domain.interactor.FavouriteInteractor diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteGraph.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteGraph.kt index 11df185..7d15316 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteGraph.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteGraph.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.favourite.ui.FavouriteScreen import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore.Action diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt index 217ff12..812022b 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/navigation/FavouriteRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.favourite.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore interface FavouriteRouter : Router diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt index c6637f7..9a4df3c 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStore.kt @@ -3,8 +3,8 @@ package com.stslex.wizard.feature.favourite.ui.store import androidx.compose.runtime.Stable import com.stslex.wizard.core.ui.kit.base.paging.PagingConfig import com.stslex.wizard.core.ui.kit.base.paging.PagingUiState -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.favourite.ui.model.FavouriteModel import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore.Action import com.stslex.wizard.feature.favourite.ui.store.FavouriteStore.Event diff --git a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreImpl.kt b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreImpl.kt index b68a6ea..250e332 100644 --- a/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreImpl.kt +++ b/feature/favourite/src/commonMain/kotlin/com/stslex/wizard/feature/favourite/ui/store/FavouriteStoreImpl.kt @@ -3,8 +3,8 @@ package com.stslex.wizard.feature.favourite.ui.store import com.stslex.wizard.core.core.AppDispatcher import com.stslex.wizard.core.ui.kit.base.mapToAppError import com.stslex.wizard.core.ui.kit.base.paging.toUi -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.core.ui.kit.pager.pager.StorePager import com.stslex.wizard.core.ui.kit.pager.pager.StorePagerFactory import com.stslex.wizard.core.ui.kit.pager.states.PagerLoadState diff --git a/feature/film/build.gradle.kts b/feature/film/build.gradle.kts index 2d904be..539a0cb 100644 --- a/feature/film/build.gradle.kts +++ b/feature/film/build.gradle.kts @@ -7,6 +7,7 @@ kotlin { implementation(project(":core:core")) implementation(project(":core:ui:kit")) implementation(project(":core:ui:image")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:database")) implementation(project(":core:navigation")) diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/ModuleFeatureFilm.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/ModuleFeatureFilm.kt index 3691820..68788ff 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/ModuleFeatureFilm.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/di/ModuleFeatureFilm.kt @@ -1,7 +1,8 @@ package com.stslex.wizard.feature.film.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.viewModelOf import com.stslex.wizard.feature.film.data.repository.FilmRepository import com.stslex.wizard.feature.film.data.repository.FilmRepositoryImpl import com.stslex.wizard.feature.film.domain.interactor.FilmInteractor @@ -19,6 +20,7 @@ import org.koin.dsl.ModuleDeclaration class ModuleFeatureFilm : AppModule() { override fun declaration(): ModuleDeclaration = { + viewModelOf(::FilmStoreImpl) { bind() } storeOf(::FilmStoreImpl) { bind() } factoryOf(::FilmRouterImpl) { bind() } factoryOf(::FilmInteractorImpl) { bind() } diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt index 0b68cc6..9ab014c 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/FilmRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.film.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.film.ui.store.FilmStore interface FilmRouter : Router diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/GraphFilm.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/GraphFilm.kt index d55e967..cea4e41 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/GraphFilm.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/navigation/GraphFilm.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.film.ui.FilmScreen import com.stslex.wizard.feature.film.ui.store.FilmStore import com.stslex.wizard.feature.film.ui.store.FilmStore.Action diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt index 0820303..57acd17 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStore.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.film.ui.store import androidx.compose.runtime.Stable -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.film.ui.store.FilmStore.Action import com.stslex.wizard.feature.film.ui.store.FilmStore.Event import com.stslex.wizard.feature.film.ui.store.FilmStore.State diff --git a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreImpl.kt b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreImpl.kt index 1db0dab..6ede5b3 100644 --- a/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreImpl.kt +++ b/feature/film/src/commonMain/kotlin/com/stslex/wizard/feature/film/ui/store/FilmStoreImpl.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.film.ui.store -import com.stslex.wizard.core.ui.kit.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.BaseStore import com.stslex.wizard.feature.film.domain.interactor.FilmInteractor import com.stslex.wizard.feature.film.navigation.FilmRouter import com.stslex.wizard.feature.film.ui.model.toDomain diff --git a/feature/film_feed/build.gradle.kts b/feature/film_feed/build.gradle.kts index 2eb4885..2dab71a 100644 --- a/feature/film_feed/build.gradle.kts +++ b/feature/film_feed/build.gradle.kts @@ -7,6 +7,7 @@ kotlin { implementation(project(":core:core")) implementation(project(":core:ui:kit")) implementation(project(":core:ui:image")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:navigation")) } diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/ModuleFeatureFeed.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/ModuleFeatureFeed.kt index cc6d207..56f5980 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/ModuleFeatureFeed.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/di/ModuleFeatureFeed.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.film_feed.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.film_feed.data.repository.FeedRepository import com.stslex.wizard.feature.film_feed.data.repository.FeedRepositoryImpl import com.stslex.wizard.feature.film_feed.domain.interactor.FeedInteractor diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt index ba86ba5..b0c42f1 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/FeedScreenRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.film_feed.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.film_feed.ui.store.FeedStore.Action.Navigation interface FeedScreenRouter : Router diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/GraphFilmFeed.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/GraphFilmFeed.kt index aca2047..0454325 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/GraphFilmFeed.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/navigation/GraphFilmFeed.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.film_feed.ui.FeedScreen import com.stslex.wizard.feature.film_feed.ui.store.FeedStore import com.stslex.wizard.feature.film_feed.ui.store.FeedStore.Action diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt index a7bfdad..1c1c975 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStore.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.film_feed.ui.store import androidx.compose.runtime.Stable -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.film_feed.ui.model.FilmModel import com.stslex.wizard.feature.film_feed.ui.model.ScreenState import com.stslex.wizard.feature.film_feed.ui.store.FeedStore.Action diff --git a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreImpl.kt b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreImpl.kt index 51ec3c1..44f210b 100644 --- a/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreImpl.kt +++ b/feature/film_feed/src/commonMain/kotlin/com/stslex/wizard/feature/film_feed/ui/store/FeedStoreImpl.kt @@ -2,7 +2,7 @@ package com.stslex.wizard.feature.film_feed.ui.store import androidx.compose.runtime.Stable import com.stslex.wizard.core.core.Logger -import com.stslex.wizard.core.ui.kit.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.BaseStore import com.stslex.wizard.feature.film_feed.domain.interactor.FeedInteractor import com.stslex.wizard.feature.film_feed.navigation.FeedScreenRouter import com.stslex.wizard.feature.film_feed.ui.model.ScreenState diff --git a/feature/follower/build.gradle.kts b/feature/follower/build.gradle.kts index f068ae9..fd6da49 100644 --- a/feature/follower/build.gradle.kts +++ b/feature/follower/build.gradle.kts @@ -6,6 +6,7 @@ kotlin { sourceSets.commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:navigation")) } diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/ModuleFeatureFollower.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/ModuleFeatureFollower.kt index e92e9e7..1c21895 100644 --- a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/ModuleFeatureFollower.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/di/ModuleFeatureFollower.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.follower.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.follower.data.repository.FollowerRepository import com.stslex.wizard.feature.follower.data.repository.FollowerRepositoryImpl import com.stslex.wizard.feature.follower.domain.interactor.FollowerInteractor diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt index 61b8454..1db8523 100644 --- a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/FollowerRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.follower.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.follower.ui.store.FollowerStore.Action.Navigation interface FollowerRouter : Router diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/GraphFollower.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/GraphFollower.kt index 2b9aac0..b904059 100644 --- a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/GraphFollower.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/navigation/GraphFollower.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.follower.ui.FollowerScreen import com.stslex.wizard.feature.follower.ui.store.FollowerStore import com.stslex.wizard.feature.follower.ui.store.FollowerStore.Action diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt index 8d6b163..da8cd2e 100644 --- a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStore.kt @@ -4,8 +4,8 @@ import androidx.compose.runtime.Stable import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.ui.kit.base.paging.PagingConfig import com.stslex.wizard.core.ui.kit.base.paging.PagingUiState -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.follower.ui.model.FollowerModel import com.stslex.wizard.feature.follower.ui.store.FollowerStore.Action import com.stslex.wizard.feature.follower.ui.store.FollowerStore.Event diff --git a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreImpl.kt b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreImpl.kt index 55e48a9..f5ca137 100644 --- a/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreImpl.kt +++ b/feature/follower/src/commonMain/kotlin/com/stslex/wizard/feature/follower/ui/store/FollowerStoreImpl.kt @@ -3,8 +3,8 @@ package com.stslex.wizard.feature.follower.ui.store import com.stslex.wizard.core.navigation.Screen.Follower.FollowerType import com.stslex.wizard.core.ui.kit.base.mapToAppError import com.stslex.wizard.core.ui.kit.base.paging.toUi -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.core.ui.kit.pager.pager.StorePager import com.stslex.wizard.core.ui.kit.pager.pager.StorePagerFactory import com.stslex.wizard.core.ui.kit.pager.states.PagerLoadState diff --git a/feature/match/build.gradle.kts b/feature/match/build.gradle.kts index 5dc2370..a9b71c1 100644 --- a/feature/match/build.gradle.kts +++ b/feature/match/build.gradle.kts @@ -6,6 +6,7 @@ kotlin { sourceSets.commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:database")) implementation(project(":core:navigation")) diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/ModuleFeatureMatch.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/ModuleFeatureMatch.kt index 637367b..b627bbd 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/ModuleFeatureMatch.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/di/ModuleFeatureMatch.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.match.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.match.data.repository.MatchRepository import com.stslex.wizard.feature.match.data.repository.MatchRepositoryImpl import com.stslex.wizard.feature.match.domain.interactor.MatchInteractor diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/GraphMatch.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/GraphMatch.kt index a60cecd..05a26e2 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/GraphMatch.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/GraphMatch.kt @@ -8,7 +8,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.match.ui.MatchScreen import com.stslex.wizard.feature.match.ui.store.MatchStore import com.stslex.wizard.feature.match.ui.store.MatchStore.Action diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt index 1843c17..b7487cc 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/navigation/MatchRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.match.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.match.ui.store.MatchStore interface MatchRouter : Router \ No newline at end of file diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt index a7fa73f..6144521 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStore.kt @@ -4,8 +4,8 @@ import androidx.compose.runtime.Stable import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.ui.kit.base.paging.PagingConfig import com.stslex.wizard.core.ui.kit.base.paging.PagingUiState -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.match.ui.model.MatchUiModel import com.stslex.wizard.feature.match.ui.store.MatchStore.Action import com.stslex.wizard.feature.match.ui.store.MatchStore.Event diff --git a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreImpl.kt b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreImpl.kt index 9767d0a..327222c 100644 --- a/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreImpl.kt +++ b/feature/match/src/commonMain/kotlin/com/stslex/wizard/feature/match/ui/store/MatchStoreImpl.kt @@ -5,8 +5,8 @@ import com.stslex.wizard.core.database.store.UserStore import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.ui.kit.base.mapToAppError import com.stslex.wizard.core.ui.kit.base.paging.toUi -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.core.ui.kit.pager.pager.StorePager import com.stslex.wizard.core.ui.kit.pager.pager.StorePagerFactory import com.stslex.wizard.core.ui.kit.pager.states.PagerLoadState diff --git a/feature/match_feed/build.gradle.kts b/feature/match_feed/build.gradle.kts index babfb3f..b3ee1b7 100644 --- a/feature/match_feed/build.gradle.kts +++ b/feature/match_feed/build.gradle.kts @@ -7,6 +7,7 @@ kotlin { implementation(project(":core:core")) implementation(project(":core:ui:kit")) implementation(project(":core:ui:image")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:navigation")) } diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/ModuleFeatureMatchFeed.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/ModuleFeatureMatchFeed.kt index 9b78ef6..11f8d04 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/ModuleFeatureMatchFeed.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/di/ModuleFeatureMatchFeed.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.match_feed.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.match_feed.data.repository.MatchFeedMockRepositoryImpl import com.stslex.wizard.feature.match_feed.data.repository.MatchFeedRepository import com.stslex.wizard.feature.match_feed.domain.MatchFeedInteractor diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/GraphMatchFeed.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/GraphMatchFeed.kt index 81b430b..81d3f30 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/GraphMatchFeed.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/GraphMatchFeed.kt @@ -7,7 +7,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.match_feed.ui.MatchFeedScreen import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStore import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStore.Action diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt index 9d05ae5..7bbd98f 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/navigation/MatchFeedRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.match_feed.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.match_feed.ui.store.MatchFeedStore interface MatchFeedRouter : Router diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt index a2850f0..fd27343 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStore.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.match_feed.ui.store import androidx.compose.runtime.Stable -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.match_feed.ui.components.SwipeDirection import com.stslex.wizard.feature.match_feed.ui.model.FilmUi import com.stslex.wizard.feature.match_feed.ui.model.MatchUi diff --git a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreImpl.kt b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreImpl.kt index 3e145e6..af4dafd 100644 --- a/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreImpl.kt +++ b/feature/match_feed/src/commonMain/kotlin/com/stslex/wizard/feature/match_feed/ui/store/MatchFeedStoreImpl.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.match_feed.ui.store import com.stslex.wizard.core.core.Logger -import com.stslex.wizard.core.ui.kit.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.BaseStore import com.stslex.wizard.feature.match_feed.domain.MatchFeedInteractor import com.stslex.wizard.feature.match_feed.navigation.MatchFeedRouter import com.stslex.wizard.feature.match_feed.ui.model.toUI diff --git a/feature/profile/build.gradle.kts b/feature/profile/build.gradle.kts index 62822db..a2bb047 100644 --- a/feature/profile/build.gradle.kts +++ b/feature/profile/build.gradle.kts @@ -7,6 +7,7 @@ kotlin { implementation(project(":core:core")) implementation(project(":core:ui:kit")) implementation(project(":core:ui:image")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:database")) implementation(project(":core:navigation")) diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ModuleFeatureProfile.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ModuleFeatureProfile.kt index 39f857e..db98cf3 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ModuleFeatureProfile.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/di/ModuleFeatureProfile.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.profile.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.profile.data.repository.ProfileRepository import com.stslex.wizard.feature.profile.data.repository.ProfileRepositoryImpl import com.stslex.wizard.feature.profile.domain.interactor.ProfileInteractor diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/GraphProfile.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/GraphProfile.kt index fb12a2c..296e7ac 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/GraphProfile.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/GraphProfile.kt @@ -8,7 +8,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.profile.ui.ProfileScreen import com.stslex.wizard.feature.profile.ui.store.ProfileStoreImpl import com.stslex.wizard.feature.profile.ui.store.ProfileStore.Action diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt index af581bd..8f7d899 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/navigation/ProfileRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.profile.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.profile.ui.store.ProfileStore interface ProfileRouter : Router \ No newline at end of file diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt index eab2f78..fe7e868 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStore.kt @@ -2,8 +2,8 @@ package com.stslex.wizard.feature.profile.ui.store import androidx.compose.runtime.Stable import com.stslex.wizard.core.navigation.Screen -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.profile.ui.store.ProfileStore.Action import com.stslex.wizard.feature.profile.ui.store.ProfileStore.Event import com.stslex.wizard.feature.profile.ui.store.ProfileStore.State diff --git a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreImpl.kt b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreImpl.kt index 0a048b7..09d69e2 100644 --- a/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreImpl.kt +++ b/feature/profile/src/commonMain/kotlin/com/stslex/wizard/feature/profile/ui/store/ProfileStoreImpl.kt @@ -3,8 +3,8 @@ package com.stslex.wizard.feature.profile.ui.store import androidx.compose.ui.graphics.Color import com.stslex.wizard.core.database.store.UserStore import com.stslex.wizard.core.navigation.Screen -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.feature.profile.domain.interactor.ProfileInteractor import com.stslex.wizard.feature.profile.navigation.ProfileRouter import com.stslex.wizard.feature.profile.ui.model.ProfileAvatarModel diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index 4cb9e77..fc4f17c 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -6,6 +6,7 @@ kotlin { sourceSets.commonMain.dependencies { implementation(project(":core:core")) implementation(project(":core:ui:kit")) + implementation(project(":core:ui:mvi")) implementation(project(":core:network:api")) implementation(project(":core:database")) implementation(project(":core:navigation")) diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/ModuleFeatureSettings.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/ModuleFeatureSettings.kt index 1845c8f..ff935be 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/ModuleFeatureSettings.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/di/ModuleFeatureSettings.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.settings.di import com.stslex.wizard.core.core.AppModule -import com.stslex.wizard.core.ui.kit.mvi.storeOf +import com.stslex.wizard.core.ui.mvi.store_di.storeOf import com.stslex.wizard.feature.settings.domain.SettingsInteractor import com.stslex.wizard.feature.settings.domain.SettingsInteractorImpl import com.stslex.wizard.feature.settings.navigation.SettingsRouter diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/GraphSettings.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/GraphSettings.kt index 79289d5..b87d420 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/GraphSettings.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/GraphSettings.kt @@ -8,7 +8,7 @@ import androidx.compose.runtime.remember import androidx.navigation.NavGraphBuilder import com.stslex.wizard.core.navigation.Screen import com.stslex.wizard.core.navigation.navScreen -import com.stslex.wizard.core.ui.kit.mvi.getStore +import com.stslex.wizard.core.ui.mvi.store_di.getStore import com.stslex.wizard.feature.settings.ui.SettingsScreen import com.stslex.wizard.feature.settings.ui.store.SettingsStoreImpl import com.stslex.wizard.feature.settings.ui.store.SettingsStore.Event diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt index d1e4c02..b4157e6 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/navigation/SettingsRouter.kt @@ -1,6 +1,6 @@ package com.stslex.wizard.feature.settings.navigation -import com.stslex.wizard.core.ui.kit.mvi.Router +import com.stslex.wizard.core.ui.mvi.Router import com.stslex.wizard.feature.settings.ui.store.SettingsStore interface SettingsRouter : Router diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt index 51f038d..b8d1e7a 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStore.kt @@ -1,8 +1,8 @@ package com.stslex.wizard.feature.settings.ui.store import androidx.compose.runtime.Stable -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents -import com.stslex.wizard.core.ui.kit.mvi.Store +import com.stslex.wizard.core.ui.mvi.CommonEvents +import com.stslex.wizard.core.ui.mvi.Store import com.stslex.wizard.feature.settings.ui.store.SettingsStore.Action import com.stslex.wizard.feature.settings.ui.store.SettingsStore.Event import com.stslex.wizard.feature.settings.ui.store.SettingsStore.State diff --git a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreImpl.kt b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreImpl.kt index 0faa8ff..16c730d 100644 --- a/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreImpl.kt +++ b/feature/settings/src/commonMain/kotlin/com/stslex/wizard/feature/settings/ui/store/SettingsStoreImpl.kt @@ -1,7 +1,7 @@ package com.stslex.wizard.feature.settings.ui.store -import com.stslex.wizard.core.ui.kit.mvi.BaseStore -import com.stslex.wizard.core.ui.kit.mvi.CommonEvents.Snackbar +import com.stslex.wizard.core.ui.mvi.BaseStore +import com.stslex.wizard.core.ui.mvi.CommonEvents.Snackbar import com.stslex.wizard.feature.settings.domain.SettingsInteractor import com.stslex.wizard.feature.settings.navigation.SettingsRouter import com.stslex.wizard.feature.settings.ui.store.SettingsStore.Action diff --git a/settings.gradle.kts b/settings.gradle.kts index 9cf6536..af51526 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -27,6 +27,7 @@ include(":core:network:client") include(":core:network:api") // UI include(":core:ui:kit") +include(":core:ui:mvi") include(":core:ui:image") // Other include(":core:database")