Skip to content

Commit 8353e0e

Browse files
committed
Update documentation comments
1 parent d75ad9c commit 8353e0e

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

KMPObservableViewModelCore/ViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Combine
99
import KMPObservableViewModelCoreObjC
1010

11-
/// A Kotlin Multiplatform Mobile ViewModel.
11+
/// A Kotlin Multiplatform ViewModel.
1212
public protocol ViewModel: ObservableObject where ObjectWillChangePublisher == ObservableObjectPublisher {
1313
/// The `ViewModelScope` of this `ViewModel`.
1414
var viewModelScope: ViewModelScope { get }

KMPObservableViewModelCore/ViewModelCancellable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// ViewModelCancellable.swift
3-
// KMPObservableViewModel
3+
// KMPObservableViewModelCore
44
//
55
// Created by Rick Clephas on 09/06/2025.
66
//

KMPObservableViewModelCoreObjC/KMPOVMPublisher.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// KMPOVMPublisher.h
3-
// KMPObservableViewModel
3+
// KMPObservableViewModelCoreObjC
44
//
55
// Created by Rick Clephas on 09/06/2025.
66
//

KMPObservableViewModelCoreObjC/KMPOVMSubscriptionCount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// KMPOVMSubscriptionCount.h
3-
// KMPObservableViewModel
3+
// KMPObservableViewModelCoreObjC
44
//
55
// Created by Rick Clephas on 09/06/2025.
66
//

kmp-observableviewmodel-core/src/appleMain/kotlin/com/rickclephas/kmp/observableviewmodel/ObservableStateFlow.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import kotlinx.coroutines.flow.MutableStateFlow
88
import kotlinx.coroutines.flow.StateFlow
99

1010
/**
11-
* A [MutableStateFlow] that triggers [NativeViewModelScope.publisher]
12-
* and accounts for the [NativeViewModelScope.subscriptionCount].
11+
* A [MutableStateFlow] wrapper that emits state change events through the [NativeViewModelScope]
12+
* and it accounts for the [NativeViewModelScope.subscriptionCount].
1313
*/
1414
@OptIn(ExperimentalForInheritanceCoroutinesApi::class)
1515
internal class ObservableMutableStateFlow<T>(
@@ -29,6 +29,9 @@ internal class ObservableMutableStateFlow<T>(
2929
override val replayCache: List<T>
3030
get() = stateFlow.replayCache
3131

32+
/**
33+
* The combined subscription count from the [NativeViewModelScope] and the actual [StateFlow].
34+
*/
3235
override val subscriptionCount: StateFlow<Int> = CombinedSubscriptionCount(viewModelScope, stateFlow)
3336

3437
override suspend fun collect(collector: FlowCollector<T>): Nothing =

0 commit comments

Comments
 (0)