mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Merge commit '6e4660dbc0cc6ea4a8c849b77bf0408cc86de6bf'
This commit is contained in:
@@ -4866,16 +4866,18 @@ extension ChatControllerImpl {
|
||||
strongSelf.updateItemNodesHighlightedStates(animated: initial)
|
||||
strongSelf.contentData?.scrolledToMessageIdValue = ScrolledToMessageId(id: mappedId, allowedReplacementDirection: [])
|
||||
|
||||
var hasQuote = false
|
||||
var extendHighlight = false
|
||||
if let quote = toSubject.quote {
|
||||
if message.text.contains(quote.string) {
|
||||
hasQuote = true
|
||||
extendHighlight = true
|
||||
} else {
|
||||
strongSelf.present(UndoOverlayController(presentationData: strongSelf.presentationData, content: .info(title: nil, text: strongSelf.presentationData.strings.Chat_ToastQuoteNotFound, timeout: nil, customUndoText: nil), elevatedLayout: false, action: { _ in return true }), in: .current)
|
||||
}
|
||||
} else if let _ = toSubject.todoTaskId {
|
||||
extendHighlight = true
|
||||
}
|
||||
|
||||
strongSelf.messageContextDisposable.set((Signal<Void, NoError>.complete() |> delay(hasQuote ? 1.5 : 0.7, queue: Queue.mainQueue())).startStrict(completed: {
|
||||
strongSelf.messageContextDisposable.set((Signal<Void, NoError>.complete() |> delay(extendHighlight ? 1.5 : 0.7, queue: Queue.mainQueue())).startStrict(completed: {
|
||||
if let strongSelf = self, let controllerInteraction = strongSelf.controllerInteraction {
|
||||
if controllerInteraction.highlightedState == highlightedState {
|
||||
controllerInteraction.highlightedState = nil
|
||||
|
||||
Reference in New Issue
Block a user