Fix crash

This commit is contained in:
Ali 2023-10-05 16:36:14 +04:00
parent 2bc467d97b
commit a76c90c1f5
2 changed files with 3 additions and 1 deletions

View File

@ -155,9 +155,10 @@ private func synchronizeChatInputState(transaction: Transaction, postbox: Postbo
flags |= 1 << 0 flags |= 1 << 0
var innerFlags: Int32 = 0 var innerFlags: Int32 = 0
if topMsgId != 0 { if topMsgId != nil {
innerFlags |= 1 << 0 innerFlags |= 1 << 0
} }
//inputReplyToMessage#73ec805 flags:# reply_to_msg_id:int top_msg_id:flags.0?int reply_to_peer_id:flags.1?InputPeer quote_text:flags.2?string quote_entities:flags.3?Vector<MessageEntity> = InputReplyTo;
replyTo = .inputReplyToMessage(flags: innerFlags, replyToMsgId: inputState?.replyToMessageId?.id ?? topMsgId ?? 0, topMsgId: topMsgId, replyToPeerId: nil, quoteText: nil, quoteEntities: nil) replyTo = .inputReplyToMessage(flags: innerFlags, replyToMsgId: inputState?.replyToMessageId?.id ?? topMsgId ?? 0, topMsgId: topMsgId, replyToPeerId: nil, quoteText: nil, quoteEntities: nil)
} }

View File

@ -46,6 +46,7 @@ func _internal_clearCloudDraftsInteractively(postbox: Postbox, network: Network,
if let topMsgId = topMsgId { if let topMsgId = topMsgId {
flags |= (1 << 0) flags |= (1 << 0)
//inputReplyToMessage#73ec805 flags:# reply_to_msg_id:int top_msg_id:flags.0?int reply_to_peer_id:flags.1?InputPeer quote_text:flags.2?string quote_entities:flags.3?Vector<MessageEntity> = InputReplyTo;
var innerFlags: Int32 = 0 var innerFlags: Int32 = 0
innerFlags |= 1 << 0 innerFlags |= 1 << 0
replyTo = .inputReplyToMessage(flags: innerFlags, replyToMsgId: 0, topMsgId: topMsgId, replyToPeerId: nil, quoteText: nil, quoteEntities: nil) replyTo = .inputReplyToMessage(flags: innerFlags, replyToMsgId: 0, topMsgId: topMsgId, replyToPeerId: nil, quoteText: nil, quoteEntities: nil)