Various improvements

This commit is contained in:
Ali
2023-10-29 20:30:26 +04:00
parent bbb543f836
commit 34bd339d8c
10 changed files with 108 additions and 17 deletions

View File

@@ -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];
}