From 6d0516175d0685193913ad9d83eb9ce61a4f7c51 Mon Sep 17 00:00:00 2001 From: Lakr Date: Mon, 16 Jun 2025 16:50:40 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BF=BCrefactor:=20continue=20cleanup=20for?= =?UTF-8?q?=202.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ios/App/App.xcodeproj/project.pbxproj | 6 - .../xcshareddata/swiftpm/Package.resolved | 41 ------- .../xcshareddata/swiftpm/Package.resolved | 23 ++-- .../App/AffineViewController+AIButton.swift | 108 +----------------- .../ios/App/App/AffineViewController.swift | 7 -- .../App/App/uniffi/affine_mobile_native.swift | 3 + .../uniffi/affine_mobile_nativeFFI.modulemap | 3 + .../Packages/AffineGraphQL/Package.resolved | 14 --- .../Sources/Fragments/License.graphql.swift | 31 ----- .../Packages/Intelligents/Package.resolved | 77 ------------- .../App/Packages/Intelligents/Package.swift | 4 +- .../Sources/Intelligents/Intelligents.swift | 25 ---- .../IntelligentsButton+Control.swift | 2 +- .../IntelligentsButton.swift | 1 - 14 files changed, 26 insertions(+), 319 deletions(-) delete mode 100644 packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 packages/frontend/apps/ios/App/Packages/AffineGraphQL/Package.resolved delete mode 100644 packages/frontend/apps/ios/App/Packages/AffineGraphQL/Sources/Fragments/License.graphql.swift delete mode 100644 packages/frontend/apps/ios/App/Packages/Intelligents/Package.resolved diff --git a/packages/frontend/apps/ios/App/App.xcodeproj/project.pbxproj b/packages/frontend/apps/ios/App/App.xcodeproj/project.pbxproj index 0bc89e3d2b..20e68e423c 100644 --- a/packages/frontend/apps/ios/App/App.xcodeproj/project.pbxproj +++ b/packages/frontend/apps/ios/App/App.xcodeproj/project.pbxproj @@ -13,7 +13,6 @@ 50802D612D112F8700694021 /* Intelligents in Frameworks */ = {isa = PBXBuildFile; productRef = 50802D602D112F8700694021 /* Intelligents */; }; 50A285D72D112A5E000D5A6D /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 50A285D62D112A5E000D5A6D /* Localizable.xcstrings */; }; 50A285D82D112A5E000D5A6D /* InfoPlist.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 50A285D52D112A5E000D5A6D /* InfoPlist.xcstrings */; }; - 50A285DC2D112B24000D5A6D /* Intelligents in Frameworks */ = {isa = PBXBuildFile; productRef = 50A285DB2D112B24000D5A6D /* Intelligents */; }; 50FF428A2D2E757E0050AA83 /* ApplicationBridgedWindowScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50FF42892D2E757E0050AA83 /* ApplicationBridgedWindowScript.swift */; }; 50FF428C2D2E77CC0050AA83 /* AffineViewController+AIButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50FF428B2D2E77CC0050AA83 /* AffineViewController+AIButton.swift */; }; 9D52FC432D26CDBF00105D0A /* JSValueContainerExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D52FC422D26CDB600105D0A /* JSValueContainerExt.swift */; }; @@ -88,7 +87,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 50A285DC2D112B24000D5A6D /* Intelligents in Frameworks */, 9DFCD1462D27D1D70028C92B /* libaffine_mobile_native.a in Frameworks */, 50802D612D112F8700694021 /* Intelligents in Frameworks */, 2E0DD47B57B994A104B25EED /* Pods_AFFiNE.framework in Frameworks */, @@ -617,10 +615,6 @@ isa = XCSwiftPackageProductDependency; productName = Intelligents; }; - 50A285DB2D112B24000D5A6D /* Intelligents */ = { - isa = XCSwiftPackageProductDependency; - productName = Intelligents; - }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 504EC2FC1FED79650016851F /* Project object */; diff --git a/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 54b8df9334..0000000000 --- a/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,41 +0,0 @@ -{ - "pins" : [ - { - "identity" : "apollo-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios", - "state" : { - "revision" : "9aa748d6f0526a744d49d59a2383dc7fdf9d645b", - "version" : "1.18.0" - } - }, - { - "identity" : "sqlite.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/stephencelis/SQLite.swift.git", - "state" : { - "revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8", - "version" : "0.15.3" - } - }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections", - "state" : { - "revision" : "c1805596154bb3a265fd91b8ac0c4433b4348fb0", - "version" : "1.2.0" - } - }, - { - "identity" : "swift-eventsource", - "kind" : "remoteSourceControl", - "location" : "https://github.com/LaunchDarkly/swift-eventsource.git", - "state" : { - "revision" : "57051701c58a93603ffa2051f8e9cf0c8cff7814", - "version" : "3.3.0" - } - } - ], - "version" : 2 -} diff --git a/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved index 8e0a0f72ba..bd7eb5f1b5 100644 --- a/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/packages/frontend/apps/ios/App/App.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -3,19 +3,28 @@ { "identity" : "apollo-ios", "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios.git", + "location" : "https://github.com/apollographql/apollo-ios", "state" : { "revision" : "9aa748d6f0526a744d49d59a2383dc7fdf9d645b", "version" : "1.18.0" } }, + { + "identity" : "snapkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/SnapKit/SnapKit.git", + "state" : { + "revision" : "2842e6e84e82eb9a8dac0100ca90d9444b0307f4", + "version" : "5.7.1" + } + }, { "identity" : "sqlite.swift", "kind" : "remoteSourceControl", "location" : "https://github.com/stephencelis/SQLite.swift.git", "state" : { - "revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8", - "version" : "0.15.3" + "revision" : "392dd6058624d9f6c5b4c769d165ddd8c7293394", + "version" : "0.15.4" } }, { @@ -28,12 +37,12 @@ } }, { - "identity" : "swift-eventsource", + "identity" : "swift-toolchain-sqlite", "kind" : "remoteSourceControl", - "location" : "https://github.com/LaunchDarkly/swift-eventsource.git", + "location" : "https://github.com/swiftlang/swift-toolchain-sqlite", "state" : { - "revision" : "57051701c58a93603ffa2051f8e9cf0c8cff7814", - "version" : "3.3.0" + "revision" : "b626d3002773b1a1304166643e7f118f724b2132", + "version" : "1.0.4" } } ], diff --git a/packages/frontend/apps/ios/App/App/AffineViewController+AIButton.swift b/packages/frontend/apps/ios/App/App/AffineViewController+AIButton.swift index e34d2da57b..b2421c76b5 100644 --- a/packages/frontend/apps/ios/App/App/AffineViewController+AIButton.swift +++ b/packages/frontend/apps/ios/App/App/AffineViewController+AIButton.swift @@ -5,11 +5,10 @@ // Created by 秋星桥 on 2025/1/8. // -import ChidoriMenu import Intelligents import UIKit -extension AFFiNEViewController: IntelligentsButtonDelegate, IntelligentsFocusApertureViewDelegate { +extension AFFiNEViewController: IntelligentsButtonDelegate { func onIntelligentsButtonTapped(_ button: IntelligentsButton) { guard let webView else { assertionFailure() // ? wdym ? @@ -18,110 +17,5 @@ extension AFFiNEViewController: IntelligentsButtonDelegate, IntelligentsFocusApe button.beginProgress() - let group = DispatchGroup() - - group.enter() - webView.evaluateScript(.getCurrentServerBaseUrl) { result in - self.baseUrl = result as? String - print("[*] setting baseUrl: \(self.baseUrl ?? "")") - group.leave() - } - - group.enter() - webView.evaluateScript(.getCurrentDocId) { result in - self.documentID = result as? String - print("[*] setting documentID: \(self.documentID ?? "")") - group.leave() - } - - group.enter() - webView.evaluateScript(.getCurrentWorkspaceId) { result in - self.workspaceID = result as? String - print("[*] setting workspaceID: \(self.workspaceID ?? "")") - group.leave() - } - - group.enter() - webView.evaluateScript(.getCurrentDocContentInMarkdown) { input in - self.documentContent = input as? String - print("[*] setting documentContent: \(self.documentContent?.count ?? 0) chars") - group.leave() - } - - DispatchQueue.global().asyncAfter(deadline: .now()) { - group.wait() - DispatchQueue.main.async { - button.stopProgress() - webView.resignFirstResponder() - self.openIntelligentsSheet() - } - } - } - - @discardableResult - func openIntelligentsSheet() -> IntelligentsFocusApertureView? { - dismissIntelligentsButton() - view.resignFirstResponder() - // stop scroll on webview - if let contentOffset = webView?.scrollView.contentOffset { - webView?.scrollView.contentOffset = contentOffset - } - let focus = IntelligentsFocusApertureView() - focus.prepareAnimationWith( - capturingTargetContentView: webView ?? .init(), - coveringRootViewController: self - ) - focus.delegate = self - focus.executeAnimationKickIn() - dismissIntelligentsButton() - return focus - } - - func openSimpleChat() { - let targetController = IntelligentsChatController() - presentIntoCurrentContext(withTargetController: targetController) - } - - func focusApertureRequestAction( - from view: IntelligentsFocusApertureView, - actionType: IntelligentsFocusApertureViewActionType - ) { - switch actionType { - case .translateTo: - var actions: [UIAction] = [] - for lang in IntelligentsEphemeralActionController.EphemeralAction.Language.allCases { - actions.append(.init(title: lang.rawValue) { [weak self] _ in - guard let self else { return } - let controller = IntelligentsEphemeralActionController( - action: .translate(to: lang) - ) - controller.workspaceID = workspaceID ?? "" - controller.documentID = documentID ?? "" - controller.documentContent = documentContent ?? "" - controller.configure(previewImage: view.capturedImage ?? .init()) - presentIntoCurrentContext(withTargetController: controller) - }) - } - view.present(menu: .init(children: actions)) { controller in - controller.overrideUserInterfaceStyle = .dark - } controllerDidPresent: { _ in } - case .summary: - let controller = IntelligentsEphemeralActionController( - action: .summarize - ) - controller.configure(previewImage: view.capturedImage ?? .init()) - controller.workspaceID = workspaceID ?? "" - controller.documentID = documentID ?? "" - controller.documentContent = documentContent ?? "" - presentIntoCurrentContext(withTargetController: controller) - case .chatWithAI: - let controller = IntelligentsChatController() - controller.metadata[.documentID] = documentID - controller.metadata[.workspaceID] = workspaceID - controller.metadata[.content] = documentContent - presentIntoCurrentContext(withTargetController: controller) - case .dismiss: - presentIntelligentsButton() - } } } diff --git a/packages/frontend/apps/ios/App/App/AffineViewController.swift b/packages/frontend/apps/ios/App/App/AffineViewController.swift index b17db0815b..5e8c3b75bd 100644 --- a/packages/frontend/apps/ios/App/App/AffineViewController.swift +++ b/packages/frontend/apps/ios/App/App/AffineViewController.swift @@ -3,13 +3,6 @@ import Intelligents import UIKit class AFFiNEViewController: CAPBridgeViewController { - var baseUrl: String? { - didSet { Intelligents.setUpstreamEndpoint(baseUrl ?? "") } - } - var documentID: String? - var workspaceID: String? - var documentContent: String? - override func viewDidLoad() { super.viewDidLoad() webView?.allowsBackForwardNavigationGestures = true diff --git a/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_native.swift b/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_native.swift index 45d68f4dc2..9e015b0b59 100644 --- a/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_native.swift +++ b/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_native.swift @@ -1711,6 +1711,7 @@ extension UniffiError: Equatable, Hashable {} + extension UniffiError: Foundation.LocalizedError { public var errorDescription: String? { String(reflecting: self) @@ -1718,6 +1719,8 @@ extension UniffiError: Foundation.LocalizedError { } + + #if swift(>=5.8) @_documentation(visibility: private) #endif diff --git a/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_nativeFFI.modulemap b/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_nativeFFI.modulemap index a7925044fd..45fbfa8fbb 100644 --- a/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_nativeFFI.modulemap +++ b/packages/frontend/apps/ios/App/App/uniffi/affine_mobile_nativeFFI.modulemap @@ -1,4 +1,7 @@ module affine_mobile_nativeFFI { header "affine_mobile_nativeFFI.h" export * + use "Darwin" + use "_Builtin_stdbool" + use "_Builtin_stdint" } \ No newline at end of file diff --git a/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Package.resolved b/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Package.resolved deleted file mode 100644 index 20f317d362..0000000000 --- a/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Package.resolved +++ /dev/null @@ -1,14 +0,0 @@ -{ - "pins" : [ - { - "identity" : "apollo-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios.git", - "state" : { - "revision" : "6ecc75281dab2fa231cb0d5fed3a3713826fecae", - "version" : "1.21.0" - } - } - ], - "version" : 2 -} diff --git a/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Sources/Fragments/License.graphql.swift b/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Sources/Fragments/License.graphql.swift deleted file mode 100644 index 61408431dc..0000000000 --- a/packages/frontend/apps/ios/App/Packages/AffineGraphQL/Sources/Fragments/License.graphql.swift +++ /dev/null @@ -1,31 +0,0 @@ -// @generated -// This file was automatically generated and should not be edited. - -@_exported import ApolloAPI - -public struct License: AffineGraphQL.SelectionSet, Fragment { - public static var fragmentDefinition: StaticString { - #"fragment license on License { __typename expiredAt installedAt quantity recurring validatedAt variant }"# - } - - public let __data: DataDict - public init(_dataDict: DataDict) { __data = _dataDict } - - public static var __parentType: any ApolloAPI.ParentType { AffineGraphQL.Objects.License } - public static var __selections: [ApolloAPI.Selection] { [ - .field("__typename", String.self), - .field("expiredAt", AffineGraphQL.DateTime?.self), - .field("installedAt", AffineGraphQL.DateTime.self), - .field("quantity", Int.self), - .field("recurring", GraphQLEnum.self), - .field("validatedAt", AffineGraphQL.DateTime.self), - .field("variant", GraphQLEnum?.self), - ] } - - public var expiredAt: AffineGraphQL.DateTime? { __data["expiredAt"] } - public var installedAt: AffineGraphQL.DateTime { __data["installedAt"] } - public var quantity: Int { __data["quantity"] } - public var recurring: GraphQLEnum { __data["recurring"] } - public var validatedAt: AffineGraphQL.DateTime { __data["validatedAt"] } - public var variant: GraphQLEnum? { __data["variant"] } -} diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.resolved b/packages/frontend/apps/ios/App/Packages/Intelligents/Package.resolved deleted file mode 100644 index 96fcf491f8..0000000000 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.resolved +++ /dev/null @@ -1,77 +0,0 @@ -{ - "pins" : [ - { - "identity" : "apollo-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apollographql/apollo-ios.git", - "state" : { - "revision" : "c3f48d45ec1300bc95243bf19f67284f9dc0d14a", - "version" : "1.15.3" - } - }, - { - "identity" : "msdisplaylink", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Lakr233/MSDisplayLink", - "state" : { - "revision" : "6e92b5513e3473e064685e64056c4ac46470e7b0", - "version" : "2.0.3" - } - }, - { - "identity" : "networkimage", - "kind" : "remoteSourceControl", - "location" : "https://github.com/gonzalezreal/NetworkImage", - "state" : { - "revision" : "2849f5323265386e200484b0d0f896e73c3411b9", - "version" : "6.0.1" - } - }, - { - "identity" : "springinterpolation", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Lakr233/SpringInterpolation", - "state" : { - "revision" : "f9d1ee3d2466bdb00fd0ade7f256ed20229c8413", - "version" : "1.3.0" - } - }, - { - "identity" : "sqlite.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/stephencelis/SQLite.swift.git", - "state" : { - "revision" : "a95fc6df17d108bd99210db5e8a9bac90fe984b8", - "version" : "0.15.3" - } - }, - { - "identity" : "swift-cmark", - "kind" : "remoteSourceControl", - "location" : "https://github.com/swiftlang/swift-cmark", - "state" : { - "revision" : "3ccff77b2dc5b96b77db3da0d68d28068593fa53", - "version" : "0.5.0" - } - }, - { - "identity" : "swift-eventsource", - "kind" : "remoteSourceControl", - "location" : "https://github.com/LaunchDarkly/swift-eventsource.git", - "state" : { - "revision" : "57051701c58a93603ffa2051f8e9cf0c8cff7814", - "version" : "3.3.0" - } - }, - { - "identity" : "swift-markdown-ui", - "kind" : "remoteSourceControl", - "location" : "https://github.com/gonzalezreal/swift-markdown-ui", - "state" : { - "revision" : "5f613358148239d0292c0cef674a3c2314737f9e", - "version" : "2.4.1" - } - } - ], - "version" : 2 -} diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift index e3f6ababcb..eeb6e098d6 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Package.swift @@ -15,14 +15,14 @@ let package = Package( dependencies: [ .package(path: "../AffineGraphQL"), .package(url: "https://github.com/apollographql/apollo-ios.git", from: "1.18.0"), - .package(url: "https://github.com/LaunchDarkly/swift-eventsource.git", from: "3.3.0"), .package(url: "https://github.com/apple/swift-collections", from: "1.2.0"), + .package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1")) ], targets: [ .target(name: "Intelligents", dependencies: [ "AffineGraphQL", + "SnapKit", .product(name: "Apollo", package: "apollo-ios"), - .product(name: "LDSwiftEventSource", package: "swift-eventsource"), .product(name: "OrderedCollections", package: "swift-collections"), ]), ] diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Intelligents.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Intelligents.swift index b16a00f45e..bfe0701cdd 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Intelligents.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Intelligents.swift @@ -6,17 +6,6 @@ import Apollo import Foundation public enum Intelligents { - public private(set) static var qlClient: ApolloClient = createQlClient() - - public static func setUpstreamEndpoint(_ upstream: String) { - guard let url = URL(string: upstream) else { - assertionFailure() - return - } - print("[*] setting up upstream endpoint to \(url.absoluteString)") - Constant.affineUpstreamURL = url - qlClient = createQlClient() - } } private extension Intelligents { @@ -29,18 +18,4 @@ private extension Intelligents { } } } - - static func createQlClient() -> ApolloClient { - let store = ApolloStore(cache: InMemoryNormalizedCache()) - let provider = DefaultInterceptorProvider( - client: URLSessionCookieClient(), - shouldInvalidateClientOnDeinit: true, - store: store - ) - let transport = RequestChainNetworkTransport( - interceptorProvider: provider, - endpointURL: Constant.affineUpstreamURL.appendingPathComponent("graphql") - ) - return .init(networkTransport: transport, store: store) - } } diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton+Control.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton+Control.swift index 117c2c594d..fc2d44e94e 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton+Control.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton+Control.swift @@ -19,7 +19,7 @@ public extension UIViewController { button.translatesAutoresizingMaskIntoConstraints = false [ button.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor, constant: -20), - button.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -20 - Constant.affineTabbarHeight), + button.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -20 - 44), button.widthAnchor.constraint(equalToConstant: 50), button.heightAnchor.constraint(equalToConstant: 50), ].forEach { $0.isActive = true } diff --git a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton.swift b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton.swift index 60572c95b0..daa5dcac62 100644 --- a/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton.swift +++ b/packages/frontend/apps/ios/App/Packages/Intelligents/Sources/Intelligents/Interface/IntelligentsButton/IntelligentsButton.swift @@ -32,7 +32,6 @@ public class IntelligentsButton: UIView { image.image = .init(named: "spark", in: .module, with: .none) image.contentMode = .scaleAspectFit - image.tintColor = .accent addSubview(image) let imageInsetValue: CGFloat = 12 image.translatesAutoresizingMaskIntoConstraints = false