This commit is contained in:
Pfeil, Scott Robert 2020-09-15 11:41:56 -04:00
parent 450b4e3e3d
commit 4e5639407e
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,23 @@
//
// NotificationModel.swift
// MVMCoreUI
//
// Created by Scott Pfeil on 9/15/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
public class NotificationModel: MoleculeModelProtocol {
public static var identifier: String = "notification"
public var moleculeName: String = NotificationModel.identifier
public var backgroundColor: Color?
public var headline: LabelModel
public var body: LabelModel?
public var button: ButtonModel?
public var closeButton: NotificationXButtonModel?
init(with headline: LabelModel) {
self.headline = headline
}
}

View File

@ -37,6 +37,8 @@ public extension MVMCoreUITopAlertView {
model.pages = nil//["settingsLanding"]
jssoonnn?.updateValue(model.toJSON()!, forKey: "TopNotification")*/
guard let json = jssoonnn?.optionalDictionaryForKey("TopNotification") else { return }
print("TYTYT top alert new json \(json)")
// TODO: Top alert view is current delegate. Should move to current view controller eventually?
let delegateObject = MVMCoreUIDelegateObject.create(withDelegateForAll: self)
showTopAlert(with: json, delegateObject: delegateObject)