Skip to content

Commit 38e2aca

Browse files
Rename SurveyResponse classes to PledgeManagerWebView (#2637)
* Rename SurveyResponse classes to PledgeManagerWebView * Suggestion from PR #2637
1 parent e6e25ef commit 38e2aca

File tree

11 files changed

+81
-78
lines changed

11 files changed

+81
-78
lines changed

Kickstarter-iOS/AppDelegateViewModel.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -613,17 +613,17 @@ public final class AppDelegateViewModel: AppDelegateViewModelType, AppDelegateVi
613613

614614
let surveyUrlFromProjectLink = deepLink
615615
.map { link -> String? in
616-
if case let .project(_, .surveyWebview(surveyUrl), _, _) = link {
616+
if case let .project(_, .pledgeManagerWebview(surveyUrl), _, _) = link {
617617
return surveyUrl
618618
}
619619
return nil
620620
}
621621
.skipNil()
622622

623-
let surveyResponseLink = Signal.merge(surveyUrlFromProjectLink, surveyUrlFromUserLink)
623+
let pledgeManagerLink = Signal.merge(surveyUrlFromProjectLink, surveyUrlFromUserLink)
624624
.observeForUI()
625625
.map { url -> [UIViewController] in
626-
[SurveyResponseViewController.configuredWith(surveyUrl: url)]
626+
[PledgeManagerWebViewController.configuredWith(url: url)]
627627
}
628628

629629
let updatesLink = projectLink
@@ -702,7 +702,7 @@ public final class AppDelegateViewModel: AppDelegateViewModelType, AppDelegateVi
702702
projectRootLink,
703703
projectCommentsLink,
704704
projectCommentThreadLink,
705-
surveyResponseLink,
705+
pledgeManagerLink,
706706
updatesLink,
707707
updateRootLink,
708708
updateCommentsLink,
@@ -1092,7 +1092,7 @@ private func navigation(fromPushEnvelope envelope: PushEnvelope) -> Navigation?
10921092
if let pledgeRedemption = envelope.pledgeRedemption {
10931093
let path = pledgeRedemption.pledgeManagerPath
10941094
let url = AppEnvironment.current.apiService.serverConfig.webBaseUrl.absoluteString + path
1095-
return .project(.id(pledgeRedemption.projectId), .surveyWebview(url), refInfo: RefInfo(.push))
1095+
return .project(.id(pledgeRedemption.projectId), .pledgeManagerWebview(url), refInfo: RefInfo(.push))
10961096
}
10971097

10981098
if let project = envelope.project {
@@ -1106,7 +1106,7 @@ private func navigation(fromPushEnvelope envelope: PushEnvelope) -> Navigation?
11061106
if let survey = envelope.survey {
11071107
let path = survey.urls.web.survey
11081108
let url = AppEnvironment.current.apiService.serverConfig.webBaseUrl.absoluteString + path
1109-
return .project(.id(survey.projectId), .surveyWebview(url), refInfo: RefInfo(.push))
1109+
return .project(.id(survey.projectId), .pledgeManagerWebview(url), refInfo: RefInfo(.push))
11101110
}
11111111

11121112
if let update = envelope.update {

Kickstarter-iOS/Features/Activities/Controller/ActivitiesViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ internal final class ActivitiesViewController: UITableViewController {
227227

228228
fileprivate func goToSurveyResponse(surveyResponse: SurveyResponse) {
229229
let url = surveyResponse.urls.web.survey
230-
let vc = SurveyResponseViewController.configuredWith(surveyUrl: url)
230+
let vc = PledgeManagerWebViewController.configuredWith(url: url)
231231
vc.delegate = self
232232

233233
let nav = UINavigationController(rootViewController: vc)
@@ -277,8 +277,8 @@ extension ActivitiesViewController: EmptyStatesViewControllerDelegate {
277277
func emptyStatesViewControllerGoToFriends() {}
278278
}
279279

280-
extension ActivitiesViewController: SurveyResponseViewControllerDelegate {
281-
func surveyResponseViewControllerDismissed() {
280+
extension ActivitiesViewController: PledgeManagerWebViewControllerDelegate {
281+
func pledgeManagerWebViewControllerDismissed() {
282282
self.viewModel.inputs.surveyResponseViewControllerDismissed()
283283
}
284284
}

Kickstarter-iOS/Features/Messages/Controller/MessagesViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ internal final class MessagesViewController: UITableViewController, MessageBanne
195195
}
196196

197197
fileprivate func goToPMPledeView(with url: String) {
198-
let vc = SurveyResponseViewController.configuredWith(surveyUrl: url)
198+
let vc = PledgeManagerWebViewController.configuredWith(url: url)
199199
self.present(vc, animated: true)
200200
}
201201

Kickstarter-iOS/Features/PledgedProjectsOverview/PPOContainerViewController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public class PPOContainerViewController: PagedContainerViewController<PPOContain
164164
}
165165

166166
private func openSurvey(_ url: String) {
167-
let vc = SurveyResponseViewController.configuredWith(surveyUrl: url)
167+
let vc = PledgeManagerWebViewController.configuredWith(url: url)
168168
vc.delegate = self
169169
let nav = UINavigationController(rootViewController: vc)
170170
nav.modalPresentationStyle = .formSheet
@@ -296,8 +296,8 @@ extension PPOContainerViewController: STPAuthenticationContext {
296296
}
297297
}
298298

299-
extension PPOContainerViewController: SurveyResponseViewControllerDelegate {
300-
public func surveyResponseViewControllerDismissed() {
299+
extension PPOContainerViewController: PledgeManagerWebViewControllerDelegate {
300+
public func pledgeManagerWebViewControllerDismissed() {
301301
self.viewModel.actionFinishedPerforming()
302302
}
303303
}

Kickstarter-iOS/Features/ProjectPage/Controller/ProjectPageViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ public final class ProjectPageViewController: UIViewController, MessageBannerVie
720720
}
721721

722722
private func goToPledgeManagementWebViewController(with backingDetailsURL: String) {
723-
let vc = SurveyResponseViewController.configuredWith(surveyUrl: backingDetailsURL)
723+
let vc = PledgeManagerWebViewController.configuredWith(url: backingDetailsURL)
724724

725725
let nc = RewardPledgeNavigationController(rootViewController: vc)
726726

Kickstarter-iOS/Features/SurveyResponse/Controller/SurveyResponseViewController.swift renamed to Kickstarter-iOS/Features/SurveyResponse/Controller/PledgeManagerWebViewController.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ import Prelude
44
import UIKit
55
import WebKit
66

7-
internal protocol SurveyResponseViewControllerDelegate: AnyObject {
7+
internal protocol PledgeManagerWebViewControllerDelegate: AnyObject {
88
/// Called when the delegate should notify the parent that self was dismissed.
9-
func surveyResponseViewControllerDismissed()
9+
func pledgeManagerWebViewControllerDismissed()
1010
}
1111

12-
internal final class SurveyResponseViewController: WebViewController {
13-
internal weak var delegate: SurveyResponseViewControllerDelegate?
12+
internal final class PledgeManagerWebViewController: WebViewController {
13+
internal weak var delegate: PledgeManagerWebViewControllerDelegate?
1414
private var sessionStartedObserver: Any?
15-
fileprivate let viewModel: SurveyResponseViewModelType = SurveyResponseViewModel()
15+
fileprivate let viewModel: PledgeManagerWebViewModelType = PledgeManagerWebViewModel()
1616

17-
internal static func configuredWith(surveyUrl: String)
18-
-> SurveyResponseViewController {
19-
let vc = SurveyResponseViewController()
20-
vc.viewModel.inputs.configureWith(surveyUrl: surveyUrl)
17+
internal static func configuredWith(url: String)
18+
-> PledgeManagerWebViewController {
19+
let vc = PledgeManagerWebViewController()
20+
vc.viewModel.inputs.configureWith(url: url)
2121
return vc
2222
}
2323

@@ -52,7 +52,7 @@ internal final class SurveyResponseViewController: WebViewController {
5252
.observeForControllerAction()
5353
.observeValues { [weak self] in
5454
self?.navigationController?.dismiss(animated: true, completion: nil)
55-
self?.delegate?.surveyResponseViewControllerDismissed()
55+
self?.delegate?.pledgeManagerWebViewControllerDismissed()
5656
}
5757

5858
self.viewModel.outputs.goToLoginSignup

Kickstarter.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -962,8 +962,8 @@
962962
94C92E8A2659F09A00A96818 /* PaddingLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94C92E7B2659EDBF00A96818 /* PaddingLabel.swift */; };
963963
9D10B91B1D35407C008B8045 /* String+Truncate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D10B91A1D35407C008B8045 /* String+Truncate.swift */; };
964964
9D50E9471D2EDBE50096DAEC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A7D1F9501C850B7C000D41D5 /* Assets.xcassets */; };
965-
9D7536CD1D78D78600A7623B /* SurveyResponseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7536CC1D78D78600A7623B /* SurveyResponseViewController.swift */; };
966-
9D7536CF1D78D88D00A7623B /* SurveyResponseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7536CE1D78D88D00A7623B /* SurveyResponseViewModel.swift */; };
965+
9D7536CD1D78D78600A7623B /* PledgeManagerWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7536CC1D78D78600A7623B /* PledgeManagerWebViewController.swift */; };
966+
9D7536CF1D78D88D00A7623B /* PledgeManagerWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D7536CE1D78D88D00A7623B /* PledgeManagerWebViewModel.swift */; };
967967
9DC572E51D36CA9800AE209C /* ProjectActivityStyles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC572E41D36CA9800AE209C /* ProjectActivityStyles.swift */; };
968968
A707BAD81CFFAB9400653B2F /* LoginIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A707BAD41CFFAB9400653B2F /* LoginIntent.swift */; };
969969
A707BADA1CFFAB9400653B2F /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = A707BAD51CFFAB9400653B2F /* Notifications.swift */; };
@@ -1130,7 +1130,7 @@
11301130
A7ED1FBC1E831C5C00BFFA01 /* FindFriendsFriendFollowCellViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F601E831C5C00BFFA01 /* FindFriendsFriendFollowCellViewModelTests.swift */; };
11311131
A7ED1FBE1E831C5C00BFFA01 /* ProjectNotificationCellViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F621E831C5C00BFFA01 /* ProjectNotificationCellViewModelTests.swift */; };
11321132
A7ED1FBF1E831C5C00BFFA01 /* SortPagerViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F631E831C5C00BFFA01 /* SortPagerViewModelTests.swift */; };
1133-
A7ED1FC61E831C5C00BFFA01 /* SurveyResponseViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F6A1E831C5C00BFFA01 /* SurveyResponseViewModelTests.swift */; };
1133+
A7ED1FC61E831C5C00BFFA01 /* PledgeManagerWebViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F6A1E831C5C00BFFA01 /* PledgeManagerWebViewModelTests.swift */; };
11341134
A7ED1FC81E831C5C00BFFA01 /* MessageThreadsViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F6C1E831C5C00BFFA01 /* MessageThreadsViewModelTests.swift */; };
11351135
A7ED1FC91E831C5C00BFFA01 /* ActivitiesViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F6D1E831C5C00BFFA01 /* ActivitiesViewModelTests.swift */; };
11361136
A7ED1FCB1E831C5C00BFFA01 /* ActivityFriendBackingViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7ED1F6F1E831C5C00BFFA01 /* ActivityFriendBackingViewModelTests.swift */; };
@@ -2708,8 +2708,8 @@
27082708
94C92E7B2659EDBF00A96818 /* PaddingLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaddingLabel.swift; sourceTree = "<group>"; };
27092709
94F4A96126125EA0000C21F9 /* TimeInterval+ISO8601DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TimeInterval+ISO8601DateTests.swift"; sourceTree = "<group>"; };
27102710
9D10B91A1D35407C008B8045 /* String+Truncate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Truncate.swift"; sourceTree = "<group>"; };
2711-
9D7536CC1D78D78600A7623B /* SurveyResponseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveyResponseViewController.swift; sourceTree = "<group>"; };
2712-
9D7536CE1D78D88D00A7623B /* SurveyResponseViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveyResponseViewModel.swift; sourceTree = "<group>"; };
2711+
9D7536CC1D78D78600A7623B /* PledgeManagerWebViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PledgeManagerWebViewController.swift; sourceTree = "<group>"; };
2712+
9D7536CE1D78D88D00A7623B /* PledgeManagerWebViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PledgeManagerWebViewModel.swift; sourceTree = "<group>"; };
27132713
9DC572E41D36CA9800AE209C /* ProjectActivityStyles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProjectActivityStyles.swift; sourceTree = "<group>"; };
27142714
A707BAD31CFFAB9400653B2F /* HelpType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HelpType.swift; sourceTree = "<group>"; };
27152715
A707BAD41CFFAB9400653B2F /* LoginIntent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginIntent.swift; sourceTree = "<group>"; };
@@ -2886,7 +2886,7 @@
28862886
A7ED1F601E831C5C00BFFA01 /* FindFriendsFriendFollowCellViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FindFriendsFriendFollowCellViewModelTests.swift; sourceTree = "<group>"; };
28872887
A7ED1F621E831C5C00BFFA01 /* ProjectNotificationCellViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProjectNotificationCellViewModelTests.swift; sourceTree = "<group>"; };
28882888
A7ED1F631E831C5C00BFFA01 /* SortPagerViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SortPagerViewModelTests.swift; sourceTree = "<group>"; };
2889-
A7ED1F6A1E831C5C00BFFA01 /* SurveyResponseViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveyResponseViewModelTests.swift; sourceTree = "<group>"; };
2889+
A7ED1F6A1E831C5C00BFFA01 /* PledgeManagerWebViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PledgeManagerWebViewModelTests.swift; sourceTree = "<group>"; };
28902890
A7ED1F6C1E831C5C00BFFA01 /* MessageThreadsViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageThreadsViewModelTests.swift; sourceTree = "<group>"; };
28912891
A7ED1F6D1E831C5C00BFFA01 /* ActivitiesViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivitiesViewModelTests.swift; sourceTree = "<group>"; };
28922892
A7ED1F6F1E831C5C00BFFA01 /* ActivityFriendBackingViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityFriendBackingViewModelTests.swift; sourceTree = "<group>"; };
@@ -4269,7 +4269,7 @@
42694269
1937A71628C93DA800DD732D /* Controller */ = {
42704270
isa = PBXGroup;
42714271
children = (
4272-
9D7536CC1D78D78600A7623B /* SurveyResponseViewController.swift */,
4272+
9D7536CC1D78D78600A7623B /* PledgeManagerWebViewController.swift */,
42734273
);
42744274
path = Controller;
42754275
sourceTree = "<group>";
@@ -7139,8 +7139,8 @@
71397139
3767EDB222CFFF380088E8E4 /* ShippingRulesViewModelTests.swift */,
71407140
A72C3A921D00F6C70075227E /* SortPagerViewModel.swift */,
71417141
A7ED1F631E831C5C00BFFA01 /* SortPagerViewModelTests.swift */,
7142-
9D7536CE1D78D88D00A7623B /* SurveyResponseViewModel.swift */,
7143-
A7ED1F6A1E831C5C00BFFA01 /* SurveyResponseViewModelTests.swift */,
7142+
9D7536CE1D78D88D00A7623B /* PledgeManagerWebViewModel.swift */,
7143+
A7ED1F6A1E831C5C00BFFA01 /* PledgeManagerWebViewModelTests.swift */,
71447144
D79970B223EB6FF800584911 /* ThanksCategoryCellViewModel.swift */,
71457145
D79970B523EC88BB00584911 /* ThanksCategoryCellViewModelTests.swift */,
71467146
A7F441AB1D005A9400FE6FC5 /* ThanksViewModel.swift */,
@@ -8717,7 +8717,7 @@
87178717
A755116B1C8642C3005355CF /* UILabel+SimpleHTML.swift in Sources */,
87188718
D66850A1236CA44C00EE9AC2 /* ProjectPamphletCreatorHeaderCellViewModel.swift in Sources */,
87198719
A75C81201D210C4700B5AD03 /* UpdateActivityItemProvider.swift in Sources */,
8720-
9D7536CF1D78D88D00A7623B /* SurveyResponseViewModel.swift in Sources */,
8720+
9D7536CF1D78D88D00A7623B /* PledgeManagerWebViewModel.swift in Sources */,
87218721
6018626829A91B8C00EA2842 /* ThirdPartyEventInputName.swift in Sources */,
87228722
A710573B1DC2B2DF00A69552 /* SharedFunctions.swift in Sources */,
87238723
D6089E8F209106CD0032CC99 /* PushNotificationDialog.swift in Sources */,
@@ -8888,7 +8888,7 @@
88888888
37CBA64D221E10E100E6CAB6 /* HelpTypeTests.swift in Sources */,
88898889
A7ED1FA91E831C5C00BFFA01 /* ActivityProjectStatusViewModelTests.swift in Sources */,
88908890
D04AACAE218BB72100CF713E /* SettingsPrivacySwitchCellViewModelTests.swift in Sources */,
8891-
A7ED1FC61E831C5C00BFFA01 /* SurveyResponseViewModelTests.swift in Sources */,
8891+
A7ED1FC61E831C5C00BFFA01 /* PledgeManagerWebViewModelTests.swift in Sources */,
88928892
061645AE26697D55007D8D96 /* CommentRepliesViewModelTests.swift in Sources */,
88938893
A7ED1F281E830FDC00BFFA01 /* CircleAvatarImageViewTests.swift in Sources */,
88948894
606C45F829FACD9F001BA067 /* RemoteConfigFeature+HelpersTests.swift in Sources */,
@@ -9195,7 +9195,7 @@
91959195
A71003E01CDD06E600B4F4D7 /* MessageThreadCell.swift in Sources */,
91969196
D0A787B52204D40E006AE4F4 /* SelectCurrencyViewController.swift in Sources */,
91979197
33C2FB6C2E203B640083B5FB /* KSRSearchBar.swift in Sources */,
9198-
9D7536CD1D78D78600A7623B /* SurveyResponseViewController.swift in Sources */,
9198+
9D7536CD1D78D78600A7623B /* PledgeManagerWebViewController.swift in Sources */,
91999199
59392BEC1D7094B0001C99A4 /* ProjectUpdatesViewController.swift in Sources */,
92009200
8A1A93D024C601CA0012FB43 /* PledgeShippingSummaryView.swift in Sources */,
92019201
8AE09C3A244537BE00036043 /* PledgeDisclaimerView.swift in Sources */,

Library/Navigation.swift

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public enum Navigation: Equatable {
5252
case pledge(Navigation.Project.Pledge)
5353
case updates
5454
case update(Int, Navigation.Project.Update)
55-
case surveyWebview(String)
55+
/// Redirects to an authenticated web view which can support pledge manager workflows.
56+
/// Argument is a fully-qualified URL for the web view.
57+
case pledgeManagerWebview(String)
5658

5759
public enum Checkout: Equatable {
5860
case thanks(racing: Bool?)
@@ -136,7 +138,7 @@ private let allRoutes: [String: (RouteParamsDecoded) -> Navigation?] = [
136138
"/search": search,
137139
"/signup": signup,
138140
"/projects/:creator_param/:project_param": project,
139-
"/projects/:creator_param/:project_param/backing/:backing_tab": projectSurvey,
141+
"/projects/:creator_param/:project_param/backing/:backing_tab": pledgeManagerWebview,
140142
"/projects/:creator_param/:project_param/checkouts/:checkout_param/thanks": thanks,
141143
"/projects/:creator_param/:project_param/comments": projectComments,
142144
"/projects/:creator_param/:project_param/creator_bio": creatorBio,
@@ -154,9 +156,9 @@ private let allRoutes: [String: (RouteParamsDecoded) -> Navigation?] = [
154156
"/projects/:creator_param/:project_param/posts/:update_param": update,
155157
"/projects/:creator_param/:project_param/updates": updates,
156158
"/projects/:creator_param/:project_param/posts/:update_param/comments": updateComments,
157-
"/projects/:creator_param/:project_param/surveys/:survey_param": projectSurvey,
158-
"/projects/:creator_param/:project_param/surveys/:survey_param/edit": projectSurvey,
159-
"/projects/:creator_param/:project_param/surveys/:survey_param/edit_address": projectSurvey,
159+
"/projects/:creator_param/:project_param/surveys/:survey_param": pledgeManagerWebview,
160+
"/projects/:creator_param/:project_param/surveys/:survey_param/edit": pledgeManagerWebview,
161+
"/projects/:creator_param/:project_param/surveys/:survey_param/edit_address": pledgeManagerWebview,
160162
"/settings/:notification_param/:enabled_param": settingsNotifications,
161163
"/users/:user_param/surveys/:survey_response_id": userSurvey
162164
]
@@ -430,7 +432,7 @@ private func posts(_ params: RouteParamsDecoded) -> Navigation? {
430432
return nil
431433
}
432434

433-
private func projectSurvey(_ params: RouteParamsDecoded) -> Navigation? {
435+
private func pledgeManagerWebview(_ params: RouteParamsDecoded) -> Navigation? {
434436
if let projectParam = params.projectParam(),
435437
var path = params.path() {
436438
// Fallback logic for deeplinks: replace `backing/details` with `backing/survey_responses`
@@ -445,8 +447,8 @@ private func projectSurvey(_ params: RouteParamsDecoded) -> Navigation? {
445447

446448
let url = AppEnvironment.current.apiService.serverConfig.webBaseUrl.absoluteString + path
447449
let refInfo = refInfoFromParams(params)
448-
let survey = Navigation.Project.surveyWebview(url)
449-
return Navigation.project(projectParam, survey, refInfo: refInfo)
450+
let pmWebview = Navigation.Project.pledgeManagerWebview(url)
451+
return Navigation.project(projectParam, pmWebview, refInfo: refInfo)
450452
}
451453

452454
return nil

0 commit comments

Comments
 (0)