Update RiotSwiftUI symbols to triple slash documentation style with function annotations.

This commit is contained in:
David Langley
2021-09-13 11:36:33 +01:00
parent 886bb98eb1
commit 3d65fbd48f
39 changed files with 184 additions and 240 deletions

View File

@@ -64,16 +64,18 @@ class TemplateUserProfileViewModel: ObservableObject, TemplateUserProfileViewMod
}
// MARK: - Private
/**
Send state actions to mutate the state.
*/
/// Send state actions to mutate the state.
/// - Parameter action: The `TemplateUserProfileStateAction` to trigger the state change.
private func dispatch(action: TemplateUserProfileStateAction) {
Self.reducer(state: &self.viewState, action: action)
}
/**
A redux style reducer, all modifications to state happen here. Receives a state and a state action and produces a new state.
*/
/// A redux style reducer
///
/// All modifications to state happen here.
/// - Parameters:
/// - state: The `inout` state to be modified,
/// - action: The action that defines which state modification should take place.
private static func reducer(state: inout TemplateUserProfileViewState, action: TemplateUserProfileStateAction) {
switch action {
case .updatePresence(let presence):