mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Voice Chat UI improvements
This commit is contained in:
parent
cfb6c53c55
commit
a33ca84134
23 changed files with 135 additions and 77 deletions
|
|
@ -610,7 +610,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||
}, enqueueMessage: { message in
|
||||
self?.sendMessages([message])
|
||||
}, sendSticker: canSendMessagesToChat(strongSelf.presentationInterfaceState) ? { fileReference, sourceNode, sourceRect in
|
||||
return self?.controllerInteraction?.sendSticker(fileReference, false, sourceNode, sourceRect) ?? false
|
||||
return self?.controllerInteraction?.sendSticker(fileReference, nil, false, sourceNode, sourceRect) ?? false
|
||||
} : nil, setupTemporaryHiddenMedia: { signal, centralIndex, galleryMedia in
|
||||
if let strongSelf = self {
|
||||
strongSelf.temporaryHiddenGalleryMediaDisposable.set((signal |> deliverOnMainQueue).start(next: { entry in
|
||||
|
|
@ -912,7 +912,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||
attributes.append(TextEntitiesMessageAttribute(entities: entities))
|
||||
}
|
||||
strongSelf.sendMessages([.message(text: text, attributes: attributes, mediaReference: nil, replyToMessageId: strongSelf.presentationInterfaceState.interfaceState.replyMessageId, localGroupingKey: nil)])
|
||||
}, sendSticker: { [weak self] fileReference, clearInput, sourceNode, sourceRect in
|
||||
}, sendSticker: { [weak self] fileReference, query, clearInput, sourceNode, sourceRect in
|
||||
guard let strongSelf = self else {
|
||||
return false
|
||||
}
|
||||
|
|
@ -944,7 +944,13 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||
})
|
||||
}
|
||||
})
|
||||
strongSelf.sendMessages([.message(text: "", attributes: [], mediaReference: fileReference.abstract, replyToMessageId: strongSelf.presentationInterfaceState.interfaceState.replyMessageId, localGroupingKey: nil)])
|
||||
|
||||
var attributes: [MessageAttribute] = []
|
||||
if let query = query {
|
||||
attributes.append(EmojiSearchQueryMessageAttribute(query: query))
|
||||
}
|
||||
|
||||
strongSelf.sendMessages([.message(text: "", attributes: attributes, mediaReference: fileReference.abstract, replyToMessageId: strongSelf.presentationInterfaceState.interfaceState.replyMessageId, localGroupingKey: nil)])
|
||||
return true
|
||||
}, sendGif: { [weak self] fileReference, sourceNode, sourceRect in
|
||||
if let strongSelf = self {
|
||||
|
|
@ -5281,7 +5287,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||
}
|
||||
}, sendSticker: { [weak self] file, sourceNode, sourceRect in
|
||||
if let strongSelf = self, canSendMessagesToChat(strongSelf.presentationInterfaceState) {
|
||||
return strongSelf.controllerInteraction?.sendSticker(file, true, sourceNode, sourceRect) ?? false
|
||||
return strongSelf.controllerInteraction?.sendSticker(file, nil, true, sourceNode, sourceRect) ?? false
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue