Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #469

Merged
merged 2 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CriticalMapsKit/Sources/AppFeature/AppFeatureCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public struct AppFeature: ReducerProtocol {
case let .fetchDataResponse(.success(response)):
state.locationsAndChatMessages = .success(response)

state.socialState.chatFeautureState.chatMessages = .results(response.chatMessages)
state.socialState.chatFeatureState.chatMessages = .results(response.chatMessages)
state.mapFeatureState.riderLocations = response.riderLocations

if !state.isChatViewPresented {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public struct SocialFeature: ReducerProtocol {
// MARK: State

public struct State: Equatable {
public var chatFeautureState: ChatFeature.State
public var chatFeatureState: ChatFeature.State
public var twitterFeedState: TwitterFeedFeature.State
public var socialControl: SocialControl

public init(
socialControl: SocialControl = .chat,
chatFeautureState: ChatFeature.State = .init(),
chatFeatureState: ChatFeature.State = .init(),
twitterFeedState: TwitterFeedFeature.State = .init()
) {
self.socialControl = socialControl
self.chatFeautureState = chatFeautureState
self.chatFeatureState = chatFeatureState
self.twitterFeedState = twitterFeedState
}
}
Expand Down Expand Up @@ -56,7 +56,7 @@ public struct SocialFeature: ReducerProtocol {
// MARK: Reducer

public var body: some ReducerProtocol<State, Action> {
Scope(state: \.chatFeautureState, action: /SocialFeature.Action.chat) {
Scope(state: \.chatFeatureState, action: /SocialFeature.Action.chat) {
ChatFeature()
.dependency(\.isNetworkAvailable, isNetworkAvailable)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct SocialView: View {
case .chat:
ChatView(
store: store.scope(
state: \.chatFeautureState,
state: \.chatFeatureState,
action: SocialFeature.Action.chat
)
)
Expand Down Expand Up @@ -78,7 +78,7 @@ struct SocialView_Previews: PreviewProvider {
SocialView(
store: Store<SocialFeature.State, SocialFeature.Action>(
initialState: SocialFeature.State(
chatFeautureState: .init(),
chatFeatureState: .init(),
twitterFeedState: .init()
),
reducer: SocialFeature()._printChanges()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ final class AppFeatureTests: XCTestCase {
await store.receive(.fetchDataResponse(.success(serviceResponse))) {
$0.locationsAndChatMessages = .success(serviceResponse)
$0.socialState = .init(
chatFeautureState: .init(chatMessages: .results(serviceResponse.chatMessages)),
chatFeatureState: .init(chatMessages: .results(serviceResponse.chatMessages)),
twitterFeedState: .init()
)
$0.mapFeatureState.riderLocations = serviceResponse.riderLocations
Expand Down Expand Up @@ -284,7 +284,7 @@ final class AppFeatureTests: XCTestCase {
await store.receive(.fetchDataResponse(.success(serviceResponse))) {
$0.locationsAndChatMessages = .success(serviceResponse)
$0.socialState = .init(
chatFeautureState: .init(chatMessages: .results(serviceResponse.chatMessages)),
chatFeatureState: .init(chatMessages: .results(serviceResponse.chatMessages)),
twitterFeedState: .init()
)
$0.mapFeatureState.riderLocations = serviceResponse.riderLocations
Expand Down Expand Up @@ -448,7 +448,7 @@ final class AppFeatureTests: XCTestCase {

await store.send(.fetchDataResponse(.success(response))) { state in
state.locationsAndChatMessages = .success(response)
state.socialState.chatFeautureState.chatMessages = .results(response.chatMessages)
state.socialState.chatFeatureState.chatMessages = .results(response.chatMessages)
state.mapFeatureState.riderLocations = response.riderLocations

state.chatMessageBadgeCount = 6
Expand All @@ -460,14 +460,14 @@ final class AppFeatureTests: XCTestCase {

await store.send(.fetchDataResponse(.success(response2))) { state in
state.locationsAndChatMessages = .success(response2)
state.socialState.chatFeautureState.chatMessages = .results(response2.chatMessages)
state.socialState.chatFeatureState.chatMessages = .results(response2.chatMessages)
state.mapFeatureState.riderLocations = response2.riderLocations

state.chatMessageBadgeCount = 1
}
await store.send(.fetchDataResponse(.success(response3))) { state in
state.locationsAndChatMessages = .success(response3)
state.socialState.chatFeautureState.chatMessages = .results(response3.chatMessages)
state.socialState.chatFeatureState.chatMessages = .results(response3.chatMessages)
state.mapFeatureState.riderLocations = response3.riderLocations

state.chatMessageBadgeCount = 3
Expand All @@ -481,7 +481,7 @@ final class AppFeatureTests: XCTestCase {
}
await store.send(.fetchDataResponse(.success(response4))) { state in
state.locationsAndChatMessages = .success(response4)
state.socialState.chatFeautureState.chatMessages = .results(response4.chatMessages)
state.socialState.chatFeatureState.chatMessages = .results(response4.chatMessages)
state.mapFeatureState.riderLocations = response4.riderLocations

state.chatMessageBadgeCount = 0
Expand Down