mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Various improvements
This commit is contained in:
@@ -68,6 +68,13 @@
|
||||
|
||||
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
|
||||
{
|
||||
if (_targetForAction) {
|
||||
ChatInputTextViewImplTargetForAction *result = _targetForAction(action);
|
||||
if (result) {
|
||||
return result.target != nil;
|
||||
}
|
||||
}
|
||||
|
||||
if (_shouldRespondToAction) {
|
||||
if (!_shouldRespondToAction(action)) {
|
||||
return false;
|
||||
@@ -102,6 +109,13 @@
|
||||
}
|
||||
|
||||
- (id)targetForAction:(SEL)action withSender:(id)__unused sender {
|
||||
if (_targetForAction) {
|
||||
ChatInputTextViewImplTargetForAction *result = _targetForAction(action);
|
||||
if (result) {
|
||||
return result.target;
|
||||
}
|
||||
}
|
||||
|
||||
return [super targetForAction:action withSender:sender];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user