mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 09:36:17 +08:00
chore: clean up
This commit is contained in:
@@ -11,7 +11,7 @@ class AFFiNEViewController: CAPBridgeViewController {
|
||||
edgesForExtendedLayout = []
|
||||
let intelligentsButton = installIntelligentsButton()
|
||||
intelligentsButton.delegate = self
|
||||
presentIntelligentsButton() // from v2.0 always visible
|
||||
dismissIntelligentsButton()
|
||||
}
|
||||
|
||||
override func webViewConfiguration(for instanceConfiguration: InstanceConfiguration) -> WKWebViewConfiguration {
|
||||
@@ -38,7 +38,11 @@ class AFFiNEViewController: CAPBridgeViewController {
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
navigationController?.setNavigationBarHidden(false, animated: animated)
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
|
||||
self.presentIntelligentsButton()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
import SnapKit
|
||||
import SwifterSwift
|
||||
import Then
|
||||
import UIKit
|
||||
|
||||
@@ -17,7 +18,10 @@ public class IntelligentsButton: UIView {
|
||||
}
|
||||
|
||||
lazy var background = UIView().then {
|
||||
$0.backgroundColor = .white
|
||||
$0.backgroundColor = .init(
|
||||
light: .systemBackground,
|
||||
dark: .darkGray.withAlphaComponent(0.25)
|
||||
)
|
||||
}
|
||||
|
||||
lazy var activityIndicator = UIActivityIndicatorView()
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class DeleteButtonView: UIView {
|
||||
required init?(coder _: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
|
||||
override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
|
||||
if bounds.width < 50 || bounds.height < 50 {
|
||||
return bounds.insetBy(dx: -20, dy: -20).contains(point)
|
||||
|
||||
Reference in New Issue
Block a user