mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -82,6 +82,7 @@ public final class MessageInputPanelComponent: Component {
|
||||
public let forwardAction: (() -> Void)?
|
||||
public let moreAction: ((UIView, ContextGesture?) -> Void)?
|
||||
public let presentVoiceMessagesUnavailableTooltip: ((UIView) -> Void)?
|
||||
public let paste: (TextFieldComponent.PasteData) -> Void
|
||||
public let audioRecorder: ManagedAudioRecorder?
|
||||
public let videoRecordingStatus: InstantVideoControllerRecordingStatus?
|
||||
public let isRecordingLocked: Bool
|
||||
@@ -121,6 +122,7 @@ public final class MessageInputPanelComponent: Component {
|
||||
forwardAction: (() -> Void)?,
|
||||
moreAction: ((UIView, ContextGesture?) -> Void)?,
|
||||
presentVoiceMessagesUnavailableTooltip: ((UIView) -> Void)?,
|
||||
paste: @escaping (TextFieldComponent.PasteData) -> Void,
|
||||
audioRecorder: ManagedAudioRecorder?,
|
||||
videoRecordingStatus: InstantVideoControllerRecordingStatus?,
|
||||
isRecordingLocked: Bool,
|
||||
@@ -159,6 +161,7 @@ public final class MessageInputPanelComponent: Component {
|
||||
self.forwardAction = forwardAction
|
||||
self.moreAction = moreAction
|
||||
self.presentVoiceMessagesUnavailableTooltip = presentVoiceMessagesUnavailableTooltip
|
||||
self.paste = paste
|
||||
self.audioRecorder = audioRecorder
|
||||
self.videoRecordingStatus = videoRecordingStatus
|
||||
self.isRecordingLocked = isRecordingLocked
|
||||
@@ -521,6 +524,9 @@ public final class MessageInputPanelComponent: Component {
|
||||
hideKeyboard: component.hideKeyboard,
|
||||
present: { c in
|
||||
component.presentController(c)
|
||||
},
|
||||
paste: { data in
|
||||
component.paste(data)
|
||||
}
|
||||
)),
|
||||
environment: {},
|
||||
|
||||
@@ -79,7 +79,8 @@ final class StickersResultPanelComponent: Component {
|
||||
self.itemsPerRow = itemsPerRow
|
||||
self.itemCount = itemCount
|
||||
|
||||
self.contentSize = CGSize(width: containerSize.width, height: topInset + CGFloat(itemCount) * itemSize.height + bottomInset)
|
||||
let rowsCount = ceil(CGFloat(itemCount) / CGFloat(itemsPerRow))
|
||||
self.contentSize = CGSize(width: containerSize.width, height: topInset + rowsCount * (itemSize.height + itemSpacing) - itemSpacing + bottomInset)
|
||||
}
|
||||
|
||||
func visibleItems(for rect: CGRect) -> Range<Int>? {
|
||||
@@ -445,7 +446,7 @@ final class StickersResultPanelComponent: Component {
|
||||
|
||||
let itemLayout = ItemLayout(
|
||||
containerSize: CGSize(width: availableSize.width, height: minimizedHeight),
|
||||
bottomInset: 9.0,
|
||||
bottomInset: 40.0,
|
||||
topInset: 9.0,
|
||||
sideInset: sideInset,
|
||||
itemSize: CGSize(width: itemSize, height: itemSize),
|
||||
|
||||
Reference in New Issue
Block a user