Skip to content

Commit

Permalink
✏️ (typos): Subscribe to update*s* not update
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Oct 27, 2023
1 parent ce57826 commit 7e3448a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class UpdateProcessTemplate: UpdateProcessProtocol {
public var sendingFileProgression = CurrentValueSubject<Float, Never>(0.0)

init() {
subscribeToStateUpdate()
subscribeToStateUpdates()
}

private func subscribeToStateUpdate() {
private func subscribeToStateUpdates() {
self.currentInternalState
.receive(on: DispatchQueue.main)
.sink(receiveCompletion: self.convertCompletion, receiveValue: self.convertReceivedValue)
Expand Down
4 changes: 2 additions & 2 deletions Apps/LekaUpdater/Sources/View/UpdateStatusDemoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ class UpdateStatusDemoViewModel: ObservableObject {
init() {
self.updateProcessController = UpdateProcessController()

subscribeToStateUpdate()
subscribeToStateUpdates()
}

public func startUpdate() {
updateProcessController.startUpdate()
}

private func subscribeToStateUpdate() {
private func subscribeToStateUpdates() {
self.updateProcessController.currentStage
.receive(on: DispatchQueue.main)
.sink { completion in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ class UpdateStatusViewModel: ObservableObject {
}

init() {
subscribeToStateUpdate()
subscribeToSendingFileProgressionUpdate()
subscribeToStateUpdates()
subscribeToSendingFileProgressionUpdates()
subscribeToRobotIsChargingUpdates()
}

private func subscribeToStateUpdate() {
private func subscribeToStateUpdates() {

Check failure on line 51 in Apps/LekaUpdater/Sources/ViewModel/UpdateStatusViewModel.swift

View workflow job for this annotation

GitHub Actions / lint

Function body should span 50 lines or less excluding comments and whitespace: currently spans 54 lines (function_body_length)
self.updateProcessController.currentStage
.receive(on: DispatchQueue.main)
.sink { completion in
Expand Down Expand Up @@ -107,7 +107,7 @@ class UpdateStatusViewModel: ObservableObject {
.store(in: &cancellables)
}

private func subscribeToSendingFileProgressionUpdate() {
private func subscribeToSendingFileProgressionUpdates() {
self.updateProcessController.sendingFileProgression
.receive(on: DispatchQueue.main)
.sink(receiveValue: { progression in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ class TouchToSelectViewViewModel: ObservableObject {
init(choices: [SelectionChoice]) {
self.gameplay = GameplaySelectAllRightAnswers(
choices: choices.map { GameplaySelectionChoiceModel(choice: $0) })
subscribeToGameplaySelectionChoicesUpdate()
subscribeToGameplaySelectionChoicesUpdates()
}

public func onChoiceTapped(choice: GameplaySelectionChoiceModel) {
gameplay.process(choice)
}

private func subscribeToGameplaySelectionChoicesUpdate() {
private func subscribeToGameplaySelectionChoicesUpdates() {
gameplay.choices
.receive(on: DispatchQueue.main)
.sink {
Expand Down

0 comments on commit 7e3448a

Please sign in to comment.