Stories improvements

This commit is contained in:
Ilya Laktyushin
2023-06-24 00:21:45 +04:00
parent 0c091f6c1b
commit 9368d93053
28 changed files with 1200 additions and 156 deletions

View File

@@ -118,7 +118,7 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, inp
let peers: Signal<(ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult?, ChatContextQueryError> = context.engine.contacts.searchLocalPeers(query: normalizedQuery)
|> map { peersAndPresences -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in
let peers = peersAndPresences.filter { peer in
if let peer = peer.peer, case .user = peer {
if let peer = peer.peer, case .user = peer, peer.addressName != nil {
return true
} else {
return false

View File

@@ -30,6 +30,8 @@ public final class MessageInputPanelComponent: Component {
public fileprivate(set) var hasText: Bool = false
public fileprivate(set) var isKeyboardHidden: Bool = false
public var initialText: NSAttributedString?
public fileprivate(set) var insertText: (NSAttributedString) -> Void = { _ in }
public fileprivate(set) var deleteBackward: () -> Void = { }
@@ -366,6 +368,11 @@ public final class MessageInputPanelComponent: Component {
self.component = component
self.state = state
if let initialText = component.externalState.initialText {
component.externalState.initialText = nil
self.textFieldExternalState.initialText = initialText
}
let hasMediaRecording = component.audioRecorder != nil || component.videoRecordingStatus != nil
let hasMediaEditing = component.recordedAudioPreview != nil