Cherry-pick various improvements

This commit is contained in:
Ilya Laktyushin
2023-09-09 23:10:19 +04:00
parent 1e51780884
commit 4e0da9eaa4
53 changed files with 930 additions and 446 deletions

View File

@@ -141,6 +141,7 @@ public final class MessageInputPanelComponent: Component {
public let bottomInset: CGFloat
public let isFormattingLocked: Bool
public let hideKeyboard: Bool
public let customInputView: UIView?
public let forceIsEditing: Bool
public let disabledPlaceholder: String?
public let isChannel: Bool
@@ -193,6 +194,7 @@ public final class MessageInputPanelComponent: Component {
bottomInset: CGFloat,
isFormattingLocked: Bool,
hideKeyboard: Bool,
customInputView: UIView?,
forceIsEditing: Bool,
disabledPlaceholder: String?,
isChannel: Bool,
@@ -244,6 +246,7 @@ public final class MessageInputPanelComponent: Component {
self.bottomInset = bottomInset
self.isFormattingLocked = isFormattingLocked
self.hideKeyboard = hideKeyboard
self.customInputView = customInputView
self.forceIsEditing = forceIsEditing
self.disabledPlaceholder = disabledPlaceholder
self.isChannel = isChannel
@@ -327,6 +330,9 @@ public final class MessageInputPanelComponent: Component {
if lhs.hideKeyboard != rhs.hideKeyboard {
return false
}
if lhs.customInputView !== rhs.customInputView {
return false
}
if lhs.forceIsEditing != rhs.forceIsEditing {
return false
}
@@ -712,6 +718,7 @@ public final class MessageInputPanelComponent: Component {
textColor: UIColor(rgb: 0xffffff),
insets: UIEdgeInsets(top: 9.0, left: 8.0, bottom: 10.0, right: 48.0),
hideKeyboard: component.hideKeyboard,
customInputView: component.customInputView,
resetText: component.resetInputContents.flatMap { resetInputContents in
switch resetInputContents {
case let .text(value):