File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,14 @@ final class TestingScenariosTableViewController: RadioSelectionTableViewControll
16
16
17
17
private var scenarioURLs : [ URL ] = [ ] {
18
18
didSet {
19
- options = scenarioURLs. map { $0. deletingPathExtension ( ) . lastPathComponent }
19
+ options = scenarioURLs. map {
20
+ $0 // /Scenarios/HF-1-Scenario_1.json
21
+ . deletingPathExtension ( ) // /Scenarios/HF-1-Scenario_1
22
+ . lastPathComponent // HF-1-Scenario_1
23
+ . replacingOccurrences ( of: " HF-1- " , with: " " ) // Scenario_1
24
+ . replacingOccurrences ( of: " HF-2- " , with: " " ) // Scenario_1
25
+ . replacingOccurrences ( of: " _ " , with: " " ) // Scenario 1
26
+ }
20
27
if isViewLoaded {
21
28
DispatchQueue . main. async {
22
29
self . updateLoadButtonEnabled ( )
@@ -163,6 +170,8 @@ final class TestingScenariosTableViewController: RadioSelectionTableViewControll
163
170
164
171
extension TestingScenariosTableViewController : TestingScenariosManagerDelegate {
165
172
func testingScenariosManager( _ manager: TestingScenariosManager , didUpdateScenarioURLs scenarioURLs: [ URL ] ) {
166
- self . scenarioURLs = scenarioURLs
173
+ let rawStudyProduct = UserDefaults . appGroup? . studyProductSelection ?? " none "
174
+ let studyProduct = StudyProduct ( rawValue: rawStudyProduct) ?? . none
175
+ self . scenarioURLs = studyProduct. filtered ( scenarioURLs: scenarioURLs)
167
176
}
168
177
}
You can’t perform that action at this time.
0 commit comments