mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[WIP] Animated emoji
This commit is contained in:
@@ -272,8 +272,17 @@ func inputTextPanelStateForChatPresentationInterfaceState(_ chatPresentationInte
|
||||
case .inputButtons:
|
||||
return ChatTextInputPanelState(accessoryItems: [.keyboard], contextPlaceholder: contextPlaceholder, mediaRecordingState: chatPresentationInterfaceState.inputTextPanelState.mediaRecordingState)
|
||||
case .none, .text:
|
||||
if let _ = chatPresentationInterfaceState.interfaceState.editMessage {
|
||||
return ChatTextInputPanelState(accessoryItems: [], contextPlaceholder: contextPlaceholder, mediaRecordingState: chatPresentationInterfaceState.inputTextPanelState.mediaRecordingState)
|
||||
if let editMessage = chatPresentationInterfaceState.interfaceState.editMessage {
|
||||
let isTextEmpty = editMessage.inputState.inputText.length == 0
|
||||
|
||||
let stickersAreEmoji = !isTextEmpty
|
||||
|
||||
var stickersEnabled = true
|
||||
stickersEnabled = true
|
||||
|
||||
accessoryItems.append(.stickers(isEnabled: stickersEnabled, isEmoji: stickersAreEmoji))
|
||||
|
||||
return ChatTextInputPanelState(accessoryItems: accessoryItems, contextPlaceholder: contextPlaceholder, mediaRecordingState: chatPresentationInterfaceState.inputTextPanelState.mediaRecordingState)
|
||||
} else {
|
||||
var accessoryItems: [ChatTextInputAccessoryItem] = []
|
||||
var extendedSearchLayout = false
|
||||
|
||||
Reference in New Issue
Block a user