no ?
This commit is contained in:
parent
0b7b73ba09
commit
85f37ddfe0
@ -46,7 +46,7 @@ public class AlertButtonModel: Codable {
|
|||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
title = try typeContainer.decode(String.self, forKey: .title)
|
title = try typeContainer.decode(String.self, forKey: .title)
|
||||||
|
|
||||||
if let style = try? typeContainer.decodeIfPresent(String.self, forKey: .style) {
|
if let style = try typeContainer.decodeIfPresent(String.self, forKey: .style) {
|
||||||
self.style = UIAlertAction.Style(rawValue: style)
|
self.style = UIAlertAction.Style(rawValue: style)
|
||||||
}
|
}
|
||||||
action = try typeContainer.decodeModel(codingKey: .action)
|
action = try typeContainer.decodeModel(codingKey: .action)
|
||||||
@ -101,7 +101,7 @@ public class AlertModel: Codable {
|
|||||||
message = try typeContainer.decode(String.self, forKey: .message)
|
message = try typeContainer.decode(String.self, forKey: .message)
|
||||||
alertActions = try typeContainer.decode([AlertButtonModel].self, forKey: .alertActions)
|
alertActions = try typeContainer.decode([AlertButtonModel].self, forKey: .alertActions)
|
||||||
|
|
||||||
if let style = try? typeContainer.decodeIfPresent(String.self, forKey: .style) {
|
if let style = try typeContainer.decodeIfPresent(String.self, forKey: .style) {
|
||||||
self.style = UIAlertController.Style(rawValue: style)
|
self.style = UIAlertController.Style(rawValue: style)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user