Merge branch 'feature/april_modify' into 'release/7_6_0'

april jira tasks

See merge request BPHV_MIPS/mvm_core!77
This commit is contained in:
Pfeil, Scott Robert 2020-04-15 18:11:31 -04:00
commit dc4fa9b8df
13 changed files with 12 additions and 34 deletions

View File

@ -13,6 +13,4 @@ import Foundation
public var actionType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
// Temporary fix till server changes
public var title: String?
}

View File

@ -15,8 +15,6 @@ import Foundation
public var callNumber: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
// Temporary fix till server changes
public var title: String?
public init(callNumber: String) {
self.callNumber = callNumber

View File

@ -13,5 +13,4 @@ import UIKit
public var actionType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
public var title: String?
}

View File

@ -13,9 +13,6 @@ public protocol ActionModelProtocol: ModelProtocol {
var actionType: String { get }
var extraParameters: JSONValueDictionary? { get set }
var analyticsData: JSONValueDictionary? { get set }
// Temporary fix till server changes
var title: String? { get set }
}
public extension ActionModelProtocol {

View File

@ -15,8 +15,6 @@ import Foundation
public var appURL: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
// Temporary fix till server changes
public var title: String?
public init(appURL: String) {
self.appURL = appURL

View File

@ -16,9 +16,6 @@ import Foundation
public var analyticsData: JSONValueDictionary?
public var presentationStyle: String?
// Temporary fix till server changes
public var title: String?
public init(pageType: String) {
self.pageType = pageType
}

View File

@ -15,9 +15,6 @@ import Foundation
public var browserUrl: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
// Temporary fix till server changes
public var title: String?
//TODO: Should be removed in future releases. This should be MF specific.
//Missing params

View File

@ -11,7 +11,6 @@ import Foundation
@objcMembers public class ActionPopupModel: ActionModelProtocol {
public static var identifier: String = "popup"
public var actionType: String = ActionPopupModel.identifier
public var title: String?
public var pageType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?

View File

@ -13,5 +13,4 @@ import UIKit
public var actionType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
public var title: String?
}

View File

@ -13,7 +13,6 @@ import UIKit
public var actionType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
public var title: String?
///Optional pageType, if pageType is nil, will start with pageType launchApp
public var pageType: String?

View File

@ -13,5 +13,4 @@ import UIKit
public var actionType: String
public var extraParameters: JSONValueDictionary?
public var analyticsData: JSONValueDictionary?
public var title: String?
}

View File

@ -16,7 +16,6 @@ import UIKit
public static var identifier: String = "share"
public var actionType: String = ActionShareModel.identifier
public var title: String?
public var sharedType: String
public var sharedText: String
public var extraParameters: JSONValueDictionary?

View File

@ -205,19 +205,18 @@ public extension UnkeyedDecodingContainer {
// Iterate and decode each.
while !containerCopy.isAtEnd {
let nestedContainer = try containerCopy.nestedContainer(keyedBy: AnyCodingKey.self)
if let identifier = try nestedContainer.decodeIfPresent(String.self, forKey: typeCodingKey) {
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
throw ModelRegistry.Error.decoderErrorModelNotMapped
}
// Now get the decoder to use for the type
let decoder = try self.superDecoder()
if let model = try type.init(from: decoder) as? T {
models.append(model)
} else {
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderError: \(typeCodingKey)")
throw ModelRegistry.Error.decoderError
}
let identifier = try nestedContainer.decode(String.self, forKey: typeCodingKey)
guard let type = ModelRegistry.getType(for: identifier, with: T.self) else {
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderErrorModelNotMapped: \(identifier)")
throw ModelRegistry.Error.decoderErrorModelNotMapped
}
// Now get the decoder to use for the type
let decoder = try self.superDecoder()
if let model = try type.init(from: decoder) as? T {
models.append(model)
} else {
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "ModelRegistry Error decoderError: \(typeCodingKey)")
throw ModelRegistry.Error.decoderError
}
}
return models