Change name to NotificationHandler
This commit is contained in:
parent
7bfc5cab71
commit
47dfb10b62
@ -291,7 +291,7 @@
|
||||
AF7E509829E477C1009DC2AD /* AlertHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509629E477C0009DC2AD /* AlertHandler.swift */; };
|
||||
AF7E509929E477C1009DC2AD /* AlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509729E477C0009DC2AD /* AlertController.swift */; };
|
||||
AFA4932029E5CA73001A9663 /* AlertOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4931F29E5CA73001A9663 /* AlertOperation.swift */; };
|
||||
AFA4932229E5EF2E001A9663 /* TopNotificationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4932129E5EF2E001A9663 /* TopNotificationHandler.swift */; };
|
||||
AFA4932229E5EF2E001A9663 /* NotificationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4932129E5EF2E001A9663 /* NotificationHandler.swift */; };
|
||||
AFA4933F29E874F0001A9663 /* MVMCoreUILoggingDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4933E29E874F0001A9663 /* MVMCoreUILoggingDelegateProtocol.swift */; };
|
||||
AFA4935729EE3DCC001A9663 /* AlertDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4935629EE3DCC001A9663 /* AlertDelegateProtocol.swift */; };
|
||||
AFE4A1D127DFB5EE00C458D0 /* VDSColorTokens.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFE4A1D027DFB5EE00C458D0 /* VDSColorTokens.xcframework */; };
|
||||
@ -895,7 +895,7 @@
|
||||
AF7E509629E477C0009DC2AD /* AlertHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertHandler.swift; sourceTree = "<group>"; };
|
||||
AF7E509729E477C0009DC2AD /* AlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertController.swift; sourceTree = "<group>"; };
|
||||
AFA4931F29E5CA73001A9663 /* AlertOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertOperation.swift; sourceTree = "<group>"; };
|
||||
AFA4932129E5EF2E001A9663 /* TopNotificationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopNotificationHandler.swift; sourceTree = "<group>"; };
|
||||
AFA4932129E5EF2E001A9663 /* NotificationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationHandler.swift; sourceTree = "<group>"; };
|
||||
AFA4933E29E874F0001A9663 /* MVMCoreUILoggingDelegateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMCoreUILoggingDelegateProtocol.swift; sourceTree = "<group>"; };
|
||||
AFA4935629EE3DCC001A9663 /* AlertDelegateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertDelegateProtocol.swift; sourceTree = "<group>"; };
|
||||
AFE4A1D027DFB5EE00C458D0 /* VDSColorTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSColorTokens.xcframework; path = ../SharedFrameworks/VDSColorTokens.xcframework; sourceTree = "<group>"; };
|
||||
@ -2153,7 +2153,7 @@
|
||||
D29DF11E21E6851E003B2FB9 /* Notification */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AFA4932129E5EF2E001A9663 /* TopNotificationHandler.swift */,
|
||||
AFA4932129E5EF2E001A9663 /* NotificationHandler.swift */,
|
||||
D2ED2814254B0EE400A1C293 /* MVMCoreGlobalTopAlertDelegateProtocol.h */,
|
||||
D2ED2809254B0EB700A1C293 /* MVMCoreTopAlertDelegateProtocol.h */,
|
||||
D2ED280A254B0EB700A1C293 /* MVMCoreTopAlertObject.h */,
|
||||
@ -3023,7 +3023,7 @@
|
||||
D20C7009250BF99B0095B21C /* TopNotificationModel.swift in Sources */,
|
||||
D29C558A25C05C7D0082E7D6 /* BGVideoImageMoleculeModel.swift in Sources */,
|
||||
8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */,
|
||||
AFA4932229E5EF2E001A9663 /* TopNotificationHandler.swift in Sources */,
|
||||
AFA4932229E5EF2E001A9663 /* NotificationHandler.swift in Sources */,
|
||||
BB2FB3BD247E7EF200DF73CD /* Tags.swift in Sources */,
|
||||
AA104ADC244734EA004D2810 /* HeadersH1LandingPageHeaderModel.swift in Sources */,
|
||||
BBAA4F03243D8E3B005AAD5F /* RadioBoxes.swift in Sources */,
|
||||
|
||||
@ -25,7 +25,7 @@ open class ActionTopAlertHandler: MVMCoreActionHandlerProtocol {
|
||||
let topAlertObject = MVMCoreTopAlertObject(responseInfo: responseInfo)!
|
||||
topAlertObject.delegate = (delegateObject as? MVMCoreUIDelegateObject)?.topAlertDelegate
|
||||
topAlertObject.pageType = model.pageType
|
||||
TopNotificationHandler.shared().showTopAlert(with: topAlertObject)
|
||||
NotificationHandler.shared().showTopAlert(with: topAlertObject)
|
||||
continuation.resume()
|
||||
})
|
||||
}
|
||||
|
||||
@ -15,6 +15,6 @@ open class ActionTopNotificationHandler: MVMCoreActionHandlerProtocol {
|
||||
|
||||
open func execute(with model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws {
|
||||
guard let model = model as? ActionTopNotificationModel else { return }
|
||||
TopNotificationHandler.shared().showTopNotification(with: model.topNotification)
|
||||
NotificationHandler.shared().showTopNotification(with: model.topNotification)
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ public class NotificationOperation: MVMCoreOperation {
|
||||
}
|
||||
}
|
||||
|
||||
public class TopNotificationHandler {
|
||||
public class NotificationHandler {
|
||||
|
||||
/// The operation queue of top notification operations.
|
||||
private var queue = OperationQueue()
|
||||
@ -274,7 +274,7 @@ public class TopNotificationHandler {
|
||||
|
||||
// Dismiss any top alerts that server wants us to dismiss/
|
||||
if let disableType = loadObject.responseInfoMap?.optionalStringForKey("disableType") {
|
||||
TopNotificationHandler.shared().hideTopAlertView(of: disableType)
|
||||
NotificationHandler.shared().hideTopAlertView(of: disableType)
|
||||
}
|
||||
|
||||
// Show any new top alert.
|
||||
@ -389,7 +389,7 @@ public class TopNotificationHandler {
|
||||
let object = model.createTopAlertObject()
|
||||
guard !checkAndUpdateExisting(with: object),
|
||||
let operation = MVMCoreTopAlertOperation(topAlertObject: object) else { return }
|
||||
TopNotificationHandler.shared().add(operation: operation)
|
||||
NotificationHandler.shared().add(operation: operation)
|
||||
}
|
||||
|
||||
/// Show the top alert with the legacy object.
|
||||
@ -444,7 +444,7 @@ public class TopNotificationHandler {
|
||||
}
|
||||
}
|
||||
|
||||
extension TopNotificationHandler: MVMCorePresentationDelegateProtocol {
|
||||
extension NotificationHandler: MVMCorePresentationDelegateProtocol {
|
||||
// Update displayable for each top alert operation when page type changes, in top queue priority order.
|
||||
public func navigationController(_ navigationController: UINavigationController, displayedViewController viewController: UIViewController) {
|
||||
guard queue.operations.count > 0 else { return }
|
||||
@ -11,7 +11,7 @@ import MVMCore
|
||||
|
||||
@objcMembers open class CoreUIObject: MVMCoreObject {
|
||||
public var alertHandler: AlertHandler?
|
||||
public var topNotificationHandler: TopNotificationHandler?
|
||||
public var topNotificationHandler: NotificationHandler?
|
||||
|
||||
open override func defaultInitialSetup() {
|
||||
CoreUIModelMapping.registerObjects()
|
||||
@ -25,6 +25,6 @@ import MVMCore
|
||||
viewControllerMapping = MVMCoreUIViewControllerMappingObject()
|
||||
loggingDelegate = MVMCoreUILoggingHandler()
|
||||
alertHandler = AlertHandler()
|
||||
topNotificationHandler = TopNotificationHandler()
|
||||
topNotificationHandler = NotificationHandler()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user