mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Limit tag tooltip to saved messages
This commit is contained in:
@@ -389,26 +389,28 @@ extension ChatControllerImpl {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let _ = (ApplicationSpecificNotice.getSavedMessageTagLabelSuggestion(accountManager: self.context.sharedContext.accountManager)
|
if self.chatLocation.peerId == self.context.account.peerId {
|
||||||
|> take(1)
|
let _ = (ApplicationSpecificNotice.getSavedMessageTagLabelSuggestion(accountManager: self.context.sharedContext.accountManager)
|
||||||
|> deliverOnMainQueue).startStandalone(next: { [weak self, weak targetView, weak itemNode] value in
|
|> take(1)
|
||||||
guard let self, let targetView, let itemNode else {
|
|> deliverOnMainQueue).startStandalone(next: { [weak self, weak targetView, weak itemNode] value in
|
||||||
return
|
guard let self, let targetView, let itemNode else {
|
||||||
}
|
return
|
||||||
if value >= 3 {
|
}
|
||||||
return
|
if value >= 3 {
|
||||||
}
|
return
|
||||||
|
}
|
||||||
let _ = itemNode
|
|
||||||
|
let _ = itemNode
|
||||||
let rect = self.chatDisplayNode.view.convert(targetView.bounds, from: targetView).insetBy(dx: -8.0, dy: -8.0)
|
|
||||||
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: self.presentationData.strings.Chat_TooltipAddTagLabel), location: .point(rect, .bottom), displayDuration: .custom(5.0), shouldDismissOnTouch: { _, _ in
|
let rect = self.chatDisplayNode.view.convert(targetView.bounds, from: targetView).insetBy(dx: -8.0, dy: -8.0)
|
||||||
return .dismiss(consume: false)
|
let tooltipScreen = TooltipScreen(account: self.context.account, sharedContext: self.context.sharedContext, text: .plain(text: self.presentationData.strings.Chat_TooltipAddTagLabel), location: .point(rect, .bottom), displayDuration: .custom(5.0), shouldDismissOnTouch: { _, _ in
|
||||||
|
return .dismiss(consume: false)
|
||||||
|
})
|
||||||
|
self.present(tooltipScreen, in: .current)
|
||||||
|
|
||||||
|
let _ = ApplicationSpecificNotice.incrementSavedMessageTagLabelSuggestion(accountManager: self.context.sharedContext.accountManager).startStandalone()
|
||||||
})
|
})
|
||||||
self.present(tooltipScreen, in: .current)
|
}
|
||||||
|
|
||||||
let _ = ApplicationSpecificNotice.incrementSavedMessageTagLabelSuggestion(accountManager: self.context.sharedContext.accountManager).startStandalone()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
controller.dismiss()
|
controller.dismiss()
|
||||||
|
|||||||
Reference in New Issue
Block a user