From f38aa87cf9d9acbf374554e6ed3d6878065743af Mon Sep 17 00:00:00 2001 From: Idan Date: Mon, 31 Oct 2022 18:31:57 +0200 Subject: [PATCH] Moko-MVVM viewModel - remove protected from viewModelScope --- .../kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt | 2 +- .../kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt | 2 +- .../kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mvvm-core/src/androidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt b/mvvm-core/src/androidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt index e47c8a1e..77481d0a 100644 --- a/mvvm-core/src/androidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt +++ b/mvvm-core/src/androidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt @@ -11,7 +11,7 @@ import kotlinx.coroutines.cancel @Suppress("EmptyDefaultConstructor") actual open class ViewModel actual constructor() : ViewModel() { - protected actual val viewModelScope: CoroutineScope = createViewModelScope() + actual val viewModelScope: CoroutineScope = createViewModelScope() public actual override fun onCleared() { super.onCleared() diff --git a/mvvm-core/src/commonMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt b/mvvm-core/src/commonMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt index e0bb68f5..b9003b95 100644 --- a/mvvm-core/src/commonMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt +++ b/mvvm-core/src/commonMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt @@ -8,7 +8,7 @@ import kotlinx.coroutines.CoroutineScope @Suppress("EmptyDefaultConstructor") expect open class ViewModel() { - protected val viewModelScope: CoroutineScope + val viewModelScope: CoroutineScope open fun onCleared() } diff --git a/mvvm-core/src/nonAndroidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt b/mvvm-core/src/nonAndroidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt index 323a0482..19162ee4 100644 --- a/mvvm-core/src/nonAndroidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt +++ b/mvvm-core/src/nonAndroidMain/kotlin/dev/icerock/moko/mvvm/viewmodel/ViewModel.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.cancel @Suppress("EmptyDefaultConstructor") actual open class ViewModel actual constructor() { - protected actual val viewModelScope: CoroutineScope = createViewModelScope() + actual val viewModelScope: CoroutineScope = createViewModelScope() actual open fun onCleared() { viewModelScope.cancel()