Attachment menu improvements

This commit is contained in:
Ilya Laktyushin
2022-02-26 17:48:25 +04:00
parent 5e84216346
commit ec8702ed07
77 changed files with 4533 additions and 325 deletions

View File

@@ -61,6 +61,10 @@ public final class NavigationBarTheme {
self.badgeTextColor = badgeTextColor
}
public func withUpdatedBackgroundColor(_ color: UIColor) -> NavigationBarTheme {
return NavigationBarTheme(buttonColor: self.buttonColor, disabledButtonColor: self.disabledButtonColor, primaryTextColor: self.primaryTextColor, backgroundColor: color, enableBackgroundBlur: false, separatorColor: self.separatorColor, badgeBackgroundColor: self.badgeBackgroundColor, badgeStrokeColor: self.badgeStrokeColor, badgeTextColor: self.badgeTextColor)
}
public func withUpdatedSeparatorColor(_ color: UIColor) -> NavigationBarTheme {
return NavigationBarTheme(buttonColor: self.buttonColor, disabledButtonColor: self.disabledButtonColor, primaryTextColor: self.primaryTextColor, backgroundColor: self.backgroundColor, enableBackgroundBlur: self.enableBackgroundBlur, separatorColor: color, badgeBackgroundColor: self.badgeBackgroundColor, badgeStrokeColor: self.badgeStrokeColor, badgeTextColor: self.badgeTextColor)
}
@@ -1334,6 +1338,8 @@ open class NavigationBar: ASDisplayNode {
public var intrinsicCanTransitionInline: Bool = true
public var passthroughTouches = true
public var canTransitionInline: Bool {
if let contentNode = self.contentNode, case .replacement = contentNode.mode {
return false
@@ -1470,8 +1476,8 @@ open class NavigationBar: ASDisplayNode {
return nil
}
//result == self.view ||
if result == self.buttonsContainerNode.view {
if self.passthroughTouches && (result == self.view || result == self.buttonsContainerNode.view) {
return nil
}