Skip to content
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
64 changes: 61 additions & 3 deletions Stepic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,13 @@
2CA3E8AF24C173C600FA3059 /* CourseInfoTabInfoAboutBlockView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA3E8AE24C173C600FA3059 /* CourseInfoTabInfoAboutBlockView.swift */; };
2CA47D4A248ABF0E00925335 /* LogoutDataClearService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA47D49248ABF0E00925335 /* LogoutDataClearService.swift */; };
2CA51BB024AB9B4300A400AE /* NewProfileUserActivityViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA51BAF24AB9B4300A400AE /* NewProfileUserActivityViewModel.swift */; };
2CA9307B253C691F007B717A /* StepPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA9307A253C691F007B717A /* StepPlainObject.swift */; };
2CA93080253C6B03007B717A /* DiscussionThreadPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA9307F253C6B03007B717A /* DiscussionThreadPlainObject.swift */; };
2CA93088253C79C9007B717A /* AttemptPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA93087253C79C9007B717A /* AttemptPlainObject.swift */; };
2CA93091253C86D0007B717A /* VideoURLPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA93090253C86D0007B717A /* VideoURLPlainObject.swift */; };
2CA93099253C8760007B717A /* VideoPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA93098253C8760007B717A /* VideoPlainObject.swift */; };
2CA930A4253C884F007B717A /* BlockPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA930A3253C884F007B717A /* BlockPlainObject.swift */; };
2CA930B7253C8A65007B717A /* ProgressPlainObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA930B6253C8A65007B717A /* ProgressPlainObject.swift */; };
2CA9D97720109718007AA743 /* AdaptiveStatsPagerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA9D97620109718007AA743 /* AdaptiveStatsPagerViewController.swift */; };
2CA9D97920109727007AA743 /* AdaptiveStatsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA9D97820109727007AA743 /* AdaptiveStatsPresenter.swift */; };
2CA9D97D20109C07007AA743 /* AdaptiveRatingsPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CA9D97C20109C07007AA743 /* AdaptiveRatingsPresenter.swift */; };
Expand Down Expand Up @@ -795,6 +802,7 @@
2CF24F67239004D8002DBD0F /* NewStepViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF24F66239004D8002DBD0F /* NewStepViewControllerTests.swift */; };
2CF6C4EB244DF619000FAAED /* ARQuickLookStoredFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF6C4EA244DF619000FAAED /* ARQuickLookStoredFileManager.swift */; };
2CF7E3342417C1A700B9188E /* UseCellularDataForDownloadsStorageManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF7E3332417C1A700B9188E /* UseCellularDataForDownloadsStorageManager.swift */; };
2CF9BD3C2538508800C2AFD2 /* PromiseKit+Retry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF9BD3B2538508800C2AFD2 /* PromiseKit+Retry.swift */; };
2CFC5ABC228ADFC400B5248A /* StepsPersistenceService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFC5ABB228ADFC400B5248A /* StepsPersistenceService.swift */; };
2CFDB1241F559F9A00B8035C /* AvatarImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFDB1231F559F9A00B8035C /* AvatarImageView.swift */; };
2CFED65F252C5AC900FCAD41 /* Result+Stepik.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFED65E252C5AC900FCAD41 /* Result+Stepik.swift */; };
Expand Down Expand Up @@ -2078,6 +2086,14 @@
2CA3E8AE24C173C600FA3059 /* CourseInfoTabInfoAboutBlockView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseInfoTabInfoAboutBlockView.swift; sourceTree = "<group>"; };
2CA47D49248ABF0E00925335 /* LogoutDataClearService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogoutDataClearService.swift; sourceTree = "<group>"; };
2CA51BAF24AB9B4300A400AE /* NewProfileUserActivityViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewProfileUserActivityViewModel.swift; sourceTree = "<group>"; };
2CA9307A253C691F007B717A /* StepPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepPlainObject.swift; sourceTree = "<group>"; };
2CA9307F253C6B03007B717A /* DiscussionThreadPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiscussionThreadPlainObject.swift; sourceTree = "<group>"; };
2CA93087253C79C9007B717A /* AttemptPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttemptPlainObject.swift; sourceTree = "<group>"; };
2CA93090253C86D0007B717A /* VideoURLPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoURLPlainObject.swift; sourceTree = "<group>"; };
2CA93098253C8760007B717A /* VideoPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPlainObject.swift; sourceTree = "<group>"; };
2CA930A3253C884F007B717A /* BlockPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlockPlainObject.swift; sourceTree = "<group>"; };
2CA930B6253C8A65007B717A /* ProgressPlainObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProgressPlainObject.swift; sourceTree = "<group>"; };
2CA930C8253C9644007B717A /* Model_step_actions_v66.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_step_actions_v66.xcdatamodel; sourceTree = "<group>"; };
2CA9D97620109718007AA743 /* AdaptiveStatsPagerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdaptiveStatsPagerViewController.swift; sourceTree = "<group>"; };
2CA9D97820109727007AA743 /* AdaptiveStatsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdaptiveStatsPresenter.swift; sourceTree = "<group>"; };
2CA9D97C20109C07007AA743 /* AdaptiveRatingsPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdaptiveRatingsPresenter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2233,6 +2249,7 @@
2CF6649122F307A500F2A899 /* Model_user_ is_organization.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Model_user_ is_organization.xcdatamodel"; sourceTree = "<group>"; };
2CF6C4EA244DF619000FAAED /* ARQuickLookStoredFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ARQuickLookStoredFileManager.swift; sourceTree = "<group>"; };
2CF7E3332417C1A700B9188E /* UseCellularDataForDownloadsStorageManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UseCellularDataForDownloadsStorageManager.swift; sourceTree = "<group>"; };
2CF9BD3B2538508800C2AFD2 /* PromiseKit+Retry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PromiseKit+Retry.swift"; sourceTree = "<group>"; };
2CFC5ABB228ADFC400B5248A /* StepsPersistenceService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepsPersistenceService.swift; sourceTree = "<group>"; };
2CFDA8181FBB3CFD0098A441 /* Model_sections_with_course_id_v21.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Model_sections_with_course_id_v21.xcdatamodel; sourceTree = "<group>"; };
2CFDB1231F559F9A00B8035C /* AvatarImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AvatarImageView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3082,8 +3099,8 @@
2C096588236C5727005B771A /* ThirdParty */ = {
isa = PBXGroup;
children = (
2C48D5FB228D865E00739477 /* Guarantee+ThenableWithFallback.swift */,
2C4DDADE242FD1A400A0B4C8 /* HTTPHeader+Stepik.swift */,
2CF9BD372538504D00C2AFD2 /* Alamofire */,
2CF9BD332538503C00C2AFD2 /* PromiseKit */,
);
path = ThirdParty;
sourceTree = "<group>";
Expand Down Expand Up @@ -3562,6 +3579,7 @@
children = (
0800B81A1D06DC1B006C987E /* Comment.swift */,
0800B8171D06D961006C987E /* DiscussionProxy.swift */,
2CA9307F253C6B03007B717A /* DiscussionThreadPlainObject.swift */,
086A8B241D21434B00F45C45 /* Vote.swift */,
);
path = Discussions;
Expand Down Expand Up @@ -4449,6 +4467,15 @@
path = StepikVideoPlayerViewController;
sourceTree = "<group>";
};
2CA9308F253C86BD007B717A /* Video */ = {
isa = PBXGroup;
children = (
2CA93098253C8760007B717A /* VideoPlainObject.swift */,
2CA93090253C86D0007B717A /* VideoURLPlainObject.swift */,
);
path = Video;
sourceTree = "<group>";
};
2CA9D98B20122EAF007AA743 /* AdaptiveLeaderboardsNames */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4715,6 +4742,23 @@
path = ModulesTests;
sourceTree = "<group>";
};
2CF9BD332538503C00C2AFD2 /* PromiseKit */ = {
isa = PBXGroup;
children = (
2C48D5FB228D865E00739477 /* Guarantee+ThenableWithFallback.swift */,
2CF9BD3B2538508800C2AFD2 /* PromiseKit+Retry.swift */,
);
path = PromiseKit;
sourceTree = "<group>";
};
2CF9BD372538504D00C2AFD2 /* Alamofire */ = {
isa = PBXGroup;
children = (
2C4DDADE242FD1A400A0B4C8 /* HTTPHeader+Stepik.swift */,
);
path = Alamofire;
sourceTree = "<group>";
};
2CFED669252C647900FCAD41 /* TableViewDataSource */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -5603,13 +5647,18 @@
2CFF903F242A2AAA00FD7311 /* PlainObjects */ = {
isa = PBXGroup;
children = (
2CA93087253C79C9007B717A /* AttemptPlainObject.swift */,
2CA930A3253C884F007B717A /* BlockPlainObject.swift */,
62E98321CB033D7736CD4DDB /* CoursePayment.swift */,
2CB3563D2476CB7B00E59A03 /* MagicLink.swift */,
2CA930B6253C8A65007B717A /* ProgressPlainObject.swift */,
2CA9307A253C691F007B717A /* StepPlainObject.swift */,
2CF10C882384243100F8CC95 /* StepSource.swift */,
2CB1C3AC240050F9001DA83E /* UserCodeRun.swift */,
2CECFEF0252F1F4C006BA883 /* VisitedCourse.swift */,
2CA3DAA62179DF7300F43888 /* Discussions */,
2C1661012358D3290020B7F4 /* StepOptions */,
2CA9308F253C86BD007B717A /* Video */,
);
path = PlainObjects;
sourceTree = "<group>";
Expand Down Expand Up @@ -7840,6 +7889,7 @@
2C97E00A215E47EC005684A1 /* SearchQueriesPresenter.swift in Sources */,
08CA59EA1BBD3D55008DC44D /* UILabelExtensions.swift in Sources */,
08FEFC211F127470005CA0FB /* AutocompleteWords.swift in Sources */,
2CA93091253C86D0007B717A /* VideoURLPlainObject.swift in Sources */,
08484F03211AF4320006266F /* SegmentedProgressView.swift in Sources */,
0861E6721CD80A9600B45652 /* Executable.swift in Sources */,
083AABE91BE8D63D005E1E96 /* Progress.swift in Sources */,
Expand Down Expand Up @@ -7968,6 +8018,7 @@
085C4FF31D89C86F00B27C95 /* UnitsAPI.swift in Sources */,
0800B8181D06D961006C987E /* DiscussionProxy.swift in Sources */,
2CE664E620F5207A0082F3FE /* DownloaderProtocol.swift in Sources */,
2CF9BD3C2538508800C2AFD2 /* PromiseKit+Retry.swift in Sources */,
0813EEA71BFE5A5400DB4B83 /* Assignment.swift in Sources */,
2C06E0B02243CD2D00AF4DA2 /* CourseInfoTabReviewsSkeletonView.swift in Sources */,
089877A2214047650065DFA2 /* SplitTestingService.swift in Sources */,
Expand Down Expand Up @@ -8046,6 +8097,7 @@
2CD846471F25FB6C00E8153C /* Profile+CoreDataProperties.swift in Sources */,
087585C01FB524C20047A269 /* ContentLanguage.swift in Sources */,
08901E631CD0EDB300D94613 /* RemoteVersionManager.swift in Sources */,
2CA930B7253C8A65007B717A /* ProgressPlainObject.swift in Sources */,
0828FF7C1BC7F9D7000AFEA7 /* Unit+CoreDataProperties.swift in Sources */,
2CD462EA226F4279004E4725 /* FetchResult.swift in Sources */,
0800B81B1D06DC1B006C987E /* Comment.swift in Sources */,
Expand Down Expand Up @@ -8204,6 +8256,7 @@
0869F6D21CE216B600F8A6DB /* PersistentQueueRecoveryManager.swift in Sources */,
08CA59F11BBFD65E008DC44D /* User+CoreDataProperties.swift in Sources */,
2C23C5E61F6BFA8800FC2B7C /* RegistrationPresenter.swift in Sources */,
2CA930A4253C884F007B717A /* BlockPlainObject.swift in Sources */,
2C5F77C41F90FC2500E8E175 /* NotificationsMarkAsReadButton.swift in Sources */,
2CF7E3342417C1A700B9188E /* UseCellularDataForDownloadsStorageManager.swift in Sources */,
086A8B251D21434B00F45C45 /* Vote.swift in Sources */,
Expand Down Expand Up @@ -8260,6 +8313,7 @@
083F2B171E9D8F1D00714173 /* CertificatesView.swift in Sources */,
2C01BB68233CD92C00C8DCF0 /* Require.swift in Sources */,
2CC5AA6C242A34C500C09F94 /* RecommendationsAPI.swift in Sources */,
2CA93099253C8760007B717A /* VideoPlainObject.swift in Sources */,
2C96E11624192ACB005EDE2B /* UIColor+DynamicColor.swift in Sources */,
080F31DD1BA7162C00F356A0 /* StepikToken.swift in Sources */,
080CE14F1E9562F30089A27F /* StepsAPI.swift in Sources */,
Expand Down Expand Up @@ -8439,6 +8493,7 @@
62E9860632B3BB21E24DF368 /* SectionsNetworkService.swift in Sources */,
62E9851C596D4146AC811EAE /* UnitsNetworkService.swift in Sources */,
62E983B402214CA82BF050E8 /* LessonsNetworkService.swift in Sources */,
2CA93080253C6B03007B717A /* DiscussionThreadPlainObject.swift in Sources */,
2CE9BF44248D07D0004F6659 /* CodeTemplatesPersistenceService.swift in Sources */,
2C8F3AE123CCBD26004D113A /* DownloadVideoQuality.swift in Sources */,
2CDB95892412C08100F676A7 /* SpotlightContinueUserActivityService.swift in Sources */,
Expand Down Expand Up @@ -8513,6 +8568,7 @@
62E98B04C8A3F4DFE7F8B00F /* BaseExploreViewController.swift in Sources */,
62E9888D488FC62B6F16A332 /* CourseInfoAssembly.swift in Sources */,
62E9826776831EAD02AA9A18 /* CourseInfoDataFlow.swift in Sources */,
2CA93088253C79C9007B717A /* AttemptPlainObject.swift in Sources */,
62E98CBA3A377097538AB3D2 /* CourseInfoHeaderViewModel.swift in Sources */,
62E98CE13AF85515F639F07D /* CourseInfoInteractor.swift in Sources */,
62E98C6E8D9F16F809760722 /* CourseInfoPresenter.swift in Sources */,
Expand Down Expand Up @@ -8791,6 +8847,7 @@
62E9833E9BFB4229BFEB4DD5 /* CodeQuizFullscreenPresenter.swift in Sources */,
62E98042B4F232FCD9788187 /* CodeQuizFullscreenProvider.swift in Sources */,
62E983915F585672BB010B73 /* CodeQuizFullscreenView.swift in Sources */,
2CA9307B253C691F007B717A /* StepPlainObject.swift in Sources */,
62E98BE715996F6FF7C93EF1 /* CodeQuizFullscreenViewController.swift in Sources */,
62E98ED854756E2499392186 /* CodeQuizFullscreenViewModel.swift in Sources */,
62E98A9DF433C986B49F7980 /* CodeQuizFullscreenCodeViewController.swift in Sources */,
Expand Down Expand Up @@ -10015,6 +10072,7 @@
08D1EF6E1BB5618700BE84E6 /* Model.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
2CA930C8253C9644007B717A /* Model_step_actions_v66.xcdatamodel */,
2C36E4772501F28E00D63C41 /* Model_user_remove_level_v65.xcdatamodel */,
2C00396424E61B3000EBC7FF /* Model_assignment_progress_id_v64.xcdatamodel */,
2CDC9EFB24E516F800916BAE /* Model_course_preview_lesson_id_v63.xcdatamodel */,
Expand Down Expand Up @@ -10082,7 +10140,7 @@
0802AC531C7222B200C4F3E6 /* Model_v2.xcdatamodel */,
08D1EF6F1BB5618700BE84E6 /* Model.xcdatamodel */,
);
currentVersion = 2C36E4772501F28E00D63C41 /* Model_user_remove_level_v65.xcdatamodel */;
currentVersion = 2CA930C8253C9644007B717A /* Model_step_actions_v66.xcdatamodel */;
path = Model.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ final class ChoiceDataset: Dataset {
super.init(coder: coder)
}

private override init() {
self.isMultipleChoice = false
self.options = []

super.init()
}

override func encode(with coder: NSCoder) {
coder.encode(self.isMultipleChoice, forKey: JSONKey.isMultipleChoice.rawValue)
coder.encode(self.options, forKey: JSONKey.options.rawValue)
Expand All @@ -60,6 +67,13 @@ final class ChoiceDataset: Dataset {
return true
}

override func copy(with zone: NSZone? = nil) -> Any {
let copy = ChoiceDataset()
copy.isMultipleChoice = self.isMultipleChoice
copy.options = self.options
return copy
}

enum JSONKey: String {
case isMultipleChoice = "is_multiple_choice"
case options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import SwiftyJSON
import Foundation

class Dataset: NSObject, NSCoding {
class Dataset: NSObject, NSCoding, NSCopying {
required init(json: JSON) {
super.init()
}
Expand All @@ -10,5 +10,11 @@ class Dataset: NSObject, NSCoding {
super.init()
}

override init() {
super.init()
}

func encode(with coder: NSCoder) {}

func copy(with zone: NSZone? = nil) -> Any { Dataset() }
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ final class FillBlanksDataset: Dataset {
super.init(coder: coder)
}

private override init() {
self.components = []
super.init()
}

override func encode(with coder: NSCoder) {
coder.encode(self.components, forKey: JSONKey.components.rawValue)
}
Expand All @@ -71,12 +76,18 @@ final class FillBlanksDataset: Dataset {
return true
}

override func copy(with zone: NSZone? = nil) -> Any {
let copy = FillBlanksDataset()
copy.components = self.components.map { $0.copy() as! FillBlanksComponent }
return copy
}

enum JSONKey: String {
case components
}
}

final class FillBlanksComponent: NSObject, NSCoding {
final class FillBlanksComponent: NSObject, NSCoding, NSCopying {
var componentType: ComponentType
var text: String
var options: [String]
Expand Down Expand Up @@ -118,6 +129,14 @@ final class FillBlanksComponent: NSObject, NSCoding {
super.init()
}

private override init() {
self.componentType = .text
self.text = ""
self.options = []

super.init()
}

func encode(with coder: NSCoder) {
coder.encode(self.componentType.rawValue, forKey: JSONKey.type.rawValue)
coder.encode(self.text, forKey: JSONKey.text.rawValue)
Expand All @@ -136,6 +155,14 @@ final class FillBlanksComponent: NSObject, NSCoding {
return true
}

func copy(with zone: NSZone? = nil) -> Any {
let copy = FillBlanksComponent()
copy.componentType = self.componentType
copy.text = self.text
copy.options = self.options
return copy
}

private static func sanitizeText(_ text: String) -> String {
var text = text

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ final class FreeAnswerDataset: Dataset {
super.init(coder: coder)
}

private override init() {
self.isHTMLEnabled = false
self.isAttachmentsEnabled = false

super.init()
}

override func encode(with coder: NSCoder) {
coder.encode(self.isHTMLEnabled, forKey: JSONKey.isHTMLEnabled.rawValue)
coder.encode(self.isAttachmentsEnabled, forKey: JSONKey.isAttachmentsEnabled.rawValue)
Expand All @@ -51,6 +58,13 @@ final class FreeAnswerDataset: Dataset {
return true
}

override func copy(with zone: NSZone? = nil) -> Any {
let copy = FreeAnswerDataset()
copy.isHTMLEnabled = self.isHTMLEnabled
copy.isAttachmentsEnabled = self.isAttachmentsEnabled
return copy
}

enum JSONKey: String {
case isHTMLEnabled = "is_html_enabled"
case isAttachmentsEnabled = "is_attachments_enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ final class MatchingDataset: Dataset {
super.init(coder: coder)
}

private override init() {
self.pairs = []
super.init()
}

override func encode(with coder: NSCoder) {
coder.encode(self.firstValues, forKey: JSONKey.first.rawValue)
coder.encode(self.secondValues, forKey: JSONKey.second.rawValue)
Expand All @@ -73,6 +78,12 @@ final class MatchingDataset: Dataset {
return true
}

override func copy(with zone: NSZone? = nil) -> Any {
let copy = MatchingDataset()
copy.pairs = self.pairs
return copy
}

enum JSONKey: String {
case pairs
case first
Expand Down
Loading