From c86fe175007eea1f7e96d4095f9f0b6d4264a621 Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Wed, 4 Oct 2023 17:09:04 -0400 Subject: [PATCH] remove dead file --- .../MF/MFActionScrollToTopHandler.swift | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 JSONCreator_iOS/JSONCreator/MF/MFActionScrollToTopHandler.swift diff --git a/JSONCreator_iOS/JSONCreator/MF/MFActionScrollToTopHandler.swift b/JSONCreator_iOS/JSONCreator/MF/MFActionScrollToTopHandler.swift deleted file mode 100644 index 870d5a3..0000000 --- a/JSONCreator_iOS/JSONCreator/MF/MFActionScrollToTopHandler.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ActionTopScrollModel.swift -// MVMCoreUI -// -// Created by Nadigadda, Sumanth on 31/03/22. -// Copyright © 2022 Verizon Wireless. All rights reserved. -// - -import Foundation -import MVMCore -import MVMCoreUI - -public protocol MVMCoreActionScrollProtocol: MVMCoreActionDelegateProtocol { - - @MainActor - func handleScrollTopAction(action: ActionModelProtocol, additionalData: [AnyHashable: Any]?) -} - -public struct ActionScrollToTopModel: ActionModelProtocol { - //-------------------------------------------------- - // MARK: - Properties - //-------------------------------------------------- - - public static var identifier: String = "scrollToTop" - public var actionType: String = ActionScrollToTopModel.identifier - public var extraParameters: JSONValueDictionary? - public var analyticsData: JSONValueDictionary? -} - -public struct ScrollToTopActionHandler: MVMCoreActionHandlerProtocol { - public init(){} - public func execute(with model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws { - guard let model = model as? ActionScrollToTopModel else { return } - await (delegateObject?.actionDelegate as? MVMCoreActionScrollProtocol)?.handleScrollTopAction(action: model, additionalData: additionalData) - } -} - -extension ScrollingViewController: MVMCoreActionScrollProtocol { - @MainActor - public func handleScrollTopAction(action: ActionModelProtocol, additionalData: [AnyHashable: Any]?) { - scrollView.setContentOffset(CGPoint(x: 0, y: -scrollView.adjustedContentInset.top), animated: true) - } -}