Skip to content

Commit 5eab201

Browse files
committed
Merge branch 'refactoring/remove-warnings' into develop
2 parents 937ce07 + 134d844 commit 5eab201

File tree

16 files changed

+77
-47
lines changed

16 files changed

+77
-47
lines changed

Modules/Sources/AppFeature/AppFeature.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public struct AppFeature: Reducer, Sendable {
399399

400400
// MARK: - Deeplinks
401401

402-
#warning("merge these two actions somehow")
402+
// TODO: Merge these two actions below somehow
403403

404404
case let .deeplink(url):
405405
do {

Modules/Sources/AppFeature/Navigation/Path.swift

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import SettingsFeature
2424
import TopicFeature
2525
import AuthFeature
2626

27-
@Reducer(state: .equatable)
27+
@Reducer
2828
public enum Path {
2929
case articles(Articles.Body = Articles.body)
3030
case favorites(FavoritesRootFeature)
@@ -34,42 +34,49 @@ public enum Path {
3434
case qms(QMS.Body = QMS.body)
3535
case auth(AuthFeature)
3636

37-
@Reducer(state: .equatable)
37+
@Reducer
3838
public enum Articles {
3939
case articlesList(ArticlesListFeature)
4040
case article(ArticleFeature)
4141
}
4242

43-
@Reducer(state: .equatable)
43+
@Reducer
4444
public enum Profile {
4545
case profile(ProfileFeature)
4646
case history(HistoryFeature)
4747
case reputation(ReputationFeature)
4848
}
4949

50-
@Reducer(state: .equatable)
50+
@Reducer
5151
public enum Forum {
5252
case forumList(ForumsListFeature)
5353
case forum(ForumFeature)
5454
case announcement(AnnouncementFeature)
5555
case topic(TopicFeature)
5656
}
5757

58-
@Reducer(state: .equatable)
58+
@Reducer
5959
public enum Settings {
6060
case settings(SettingsFeature)
6161
case navigation(NavigationSettingsFeature)
6262
case notifications(NotificationsFeature)
6363
case developer(DeveloperFeature)
6464
}
6565

66-
@Reducer(state: .equatable)
66+
@Reducer
6767
public enum QMS {
6868
case qmsList(QMSListFeature)
6969
case qms(QMSFeature)
7070
}
7171
}
7272

73+
extension Path.State: Equatable {}
74+
extension Path.Articles.State: Equatable {}
75+
extension Path.Profile.State: Equatable {}
76+
extension Path.Forum.State: Equatable {}
77+
extension Path.Settings.State: Equatable {}
78+
extension Path.QMS.State: Equatable {}
79+
7380
extension Path {
7481
@MainActor @ViewBuilder
7582
public static func view(_ store: Store<Path.State, Path.Action>) -> some View {

Modules/Sources/AppFeature/Navigation/StackTab.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public struct StackTab: Reducer, Sendable {
295295
private func handleAuthNavigation(action: AuthFeature.Action, state: inout State) -> Effect<Action> {
296296
// Also make necessary changes to delegate actions in AppFeature
297297
switch action {
298-
case let .delegate(.loginSuccess(reason, userId)):
298+
case .delegate(.loginSuccess(_, _)):
299299
fatalError("Auth navigation must be handled in ProfileFlow enum reducer")
300300

301301
case .delegate(.showSettings):

Modules/Sources/ArticleFeature/ArticleFeature.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct ArticleFeature: Reducer, Sendable {
3737

3838
// MARK: - Destinations
3939

40-
@Reducer(state: .equatable)
40+
@Reducer
4141
public enum Destination: Hashable {
4242
@ReducerCaseIgnored
4343
case share(URL)
@@ -465,6 +465,8 @@ public struct ArticleFeature: Reducer, Sendable {
465465
}
466466
}
467467

468+
extension ArticleFeature.Destination.State: Equatable {}
469+
468470
// MARK: - Alert Extension
469471

470472
extension AlertState where Action == ArticleFeature.Destination.Alert {

Modules/Sources/ArticlesListFeature/ArticlesListFeature.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public struct ArticlesListFeature: Reducer, Sendable {
4646

4747
// MARK: - Destinations
4848

49-
@Reducer(state: .equatable)
49+
@Reducer
5050
public enum Destination: Hashable {
5151
@ReducerCaseIgnored
5252
case share(URL)
@@ -254,3 +254,5 @@ public struct ArticlesListFeature: Reducer, Sendable {
254254
return .none
255255
}
256256
}
257+
258+
extension ArticlesListFeature.Destination.State: Equatable {}

Modules/Sources/BBBuilder/Builder/BBBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ public struct BBBuilder {
161161
}
162162

163163
case .img:
164+
// TODO: Finish image case
164165
logger.info("Image case")
165-
#warning("todo")
166166
mergedNodes.lastOrAppend = unwrap(node: node, with: mutableText)
167167

168168
case let .attachment(attribute):

Modules/Sources/ForumsListFeature/ForumsListFeature.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ public struct ForumsListFeature: Reducer, Sendable {
101101
reportFullyDisplayed(&state)
102102

103103
case let .internal(.forumsListResponse(.failure(error))):
104-
#warning("add toast")
104+
print(error)
105+
// TODO: Add toast
105106
reportFullyDisplayed(&state)
106107

107108
case .delegate:

Modules/Sources/ProfileFeature/Edit/EditFeature.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct EditFeature: Reducer, Sendable {
2727

2828
// MARK: - Destinations
2929

30-
@Reducer(state: .equatable)
30+
@Reducer
3131
public enum Destination: Hashable, Equatable {
3232
case alert(AlertState<Alert>)
3333
case avatarPicker
@@ -226,6 +226,8 @@ public struct EditFeature: Reducer, Sendable {
226226
}
227227
}
228228

229+
extension EditFeature.Destination.State: Equatable {}
230+
229231
private extension Date {
230232
func toProfileString() -> String {
231233
let dateFormatter = DateFormatter()

Modules/Sources/ProfileFeature/ProfileFeature.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public struct ProfileFeature: Reducer, Sendable {
2727

2828
// MARK: - Destinations
2929

30-
@Reducer(state: .equatable)
30+
@Reducer
3131
public enum Destination {
3232
case alert(AlertState<ProfileFeature.Action.Alert>)
3333
case editProfile(EditFeature)
@@ -198,6 +198,8 @@ public struct ProfileFeature: Reducer, Sendable {
198198
}
199199
}
200200

201+
extension ProfileFeature.Destination.State: Equatable {}
202+
201203
// MARK: - Alert Extension
202204

203205
private extension AlertState where Action == ProfileFeature.Action.Alert {

Modules/Sources/ReputationFeature/ReputationFeature.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public struct ReputationFeature: Reducer, Sendable {
1717

1818
// MARK: - Destinations
1919

20-
@Reducer(state: .equatable)
20+
@Reducer
2121
public enum Destination: Hashable {
2222
case alert(AlertState<Alert>)
2323

@@ -164,6 +164,7 @@ public struct ReputationFeature: Reducer, Sendable {
164164
return .none
165165

166166
case let .internal(.historyResponse(.failure(error))):
167+
print(error)
167168
state.isLoading = false
168169
state.destination = .alert(.error)
169170
reportFullyDisplayed(&state)
@@ -182,6 +183,8 @@ public struct ReputationFeature: Reducer, Sendable {
182183
}
183184
}
184185

186+
extension ReputationFeature.Destination.State: Equatable {}
187+
185188
// MARK: - Alert Extension
186189

187190
extension AlertState where Action == ReputationFeature.Destination.Alert {

0 commit comments

Comments
 (0)