pr fixes
This commit is contained in:
parent
c250769620
commit
11aaedfa6b
@ -21,7 +21,6 @@ import Foundation
|
||||
case backgroundColor
|
||||
case peakingUI
|
||||
case peakingArrowColor
|
||||
case molecule
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
@ -40,6 +39,5 @@ import Foundation
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeIfPresent(peakingUI, forKey: .peakingUI)
|
||||
try container.encodeIfPresent(peakingArrowColor, forKey: .peakingArrowColor)
|
||||
try container.encodeModel(molecule, forKey: .molecule)
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,8 +52,8 @@ import Foundation
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case molecules
|
||||
case molecule
|
||||
case dropDown
|
||||
case line
|
||||
case backgroundColor
|
||||
@ -80,6 +80,7 @@ import Foundation
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeModels2D(molecules, forKey: .molecules)
|
||||
try container.encode(dropDown, forKey: .dropDown)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
|
||||
@ -21,7 +21,6 @@ import MVMCore
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case molecule
|
||||
case action
|
||||
case hideArrow
|
||||
case line
|
||||
@ -65,8 +64,6 @@ import MVMCore
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeModel(molecule, forKey: .molecule)
|
||||
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeModelIfPresent(action, forKey: .action)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user