UI improvements

This commit is contained in:
Ali
2022-09-09 21:34:27 +04:00
parent e61ae3c0b3
commit 64b1eab732
24 changed files with 675 additions and 122 deletions

View File

@@ -14,15 +14,18 @@ import LocalizedPeerData
public final class EntityKeyboardChildEnvironment: Equatable {
public let theme: PresentationTheme
public let strings: PresentationStrings
public let isContentInFocus: Bool
public let getContentActiveItemUpdated: (AnyHashable) -> ActionSlot<(AnyHashable, AnyHashable?, Transition)>?
public init(
theme: PresentationTheme,
strings: PresentationStrings,
isContentInFocus: Bool,
getContentActiveItemUpdated: @escaping (AnyHashable) -> ActionSlot<(AnyHashable, AnyHashable?, Transition)>?
) {
self.theme = theme
self.strings = strings
self.isContentInFocus = isContentInFocus
self.getContentActiveItemUpdated = getContentActiveItemUpdated
}
@@ -33,6 +36,9 @@ public final class EntityKeyboardChildEnvironment: Equatable {
if lhs.strings !== rhs.strings {
return false
}
if lhs.isContentInFocus != rhs.isContentInFocus {
return false
}
return true
}
@@ -81,6 +87,7 @@ public final class EntityKeyboardComponent: Component {
public let theme: PresentationTheme
public let strings: PresentationStrings
public let isContentInFocus: Bool
public let containerInsets: UIEdgeInsets
public let topPanelInsets: UIEdgeInsets
public let emojiContent: EmojiPagerContentComponent
@@ -104,6 +111,7 @@ public final class EntityKeyboardComponent: Component {
public init(
theme: PresentationTheme,
strings: PresentationStrings,
isContentInFocus: Bool,
containerInsets: UIEdgeInsets,
topPanelInsets: UIEdgeInsets,
emojiContent: EmojiPagerContentComponent,
@@ -126,6 +134,7 @@ public final class EntityKeyboardComponent: Component {
) {
self.theme = theme
self.strings = strings
self.isContentInFocus = isContentInFocus
self.containerInsets = containerInsets
self.topPanelInsets = topPanelInsets
self.emojiContent = emojiContent
@@ -154,6 +163,9 @@ public final class EntityKeyboardComponent: Component {
if lhs.strings !== rhs.strings {
return false
}
if lhs.isContentInFocus != rhs.isContentInFocus {
return false
}
if lhs.containerInsets != rhs.containerInsets {
return false
}
@@ -620,6 +632,7 @@ public final class EntityKeyboardComponent: Component {
EntityKeyboardChildEnvironment(
theme: component.theme,
strings: component.strings,
isContentInFocus: component.isContentInFocus,
getContentActiveItemUpdated: { id in
if id == AnyHashable("gifs") {
return gifsContentItemIdUpdated