mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 14:02:48 +00:00
Fix issue #61
This commit is contained in:
parent
655a55dc85
commit
faab914a08
@ -210,6 +210,10 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v
|
|||||||
{
|
{
|
||||||
NSParameterAssert(action);
|
NSParameterAssert(action);
|
||||||
NSParameterAssert(controlEventMask != 0);
|
NSParameterAssert(controlEventMask != 0);
|
||||||
|
|
||||||
|
// Convert nil to [NSNull null] so that it can be used as a key for NSMapTable.
|
||||||
|
if (!target)
|
||||||
|
target = [NSNull null];
|
||||||
|
|
||||||
// Enumerate the events in the mask, adding the target-action pair for each control event included in controlEventMask
|
// Enumerate the events in the mask, adding the target-action pair for each control event included in controlEventMask
|
||||||
_ASEnumerateControlEventsIncludedInMaskWithBlock(controlEventMask, ^
|
_ASEnumerateControlEventsIncludedInMaskWithBlock(controlEventMask, ^
|
||||||
@ -346,7 +350,10 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v
|
|||||||
|
|
||||||
// Hand off to UIApplication to send the action message.
|
// Hand off to UIApplication to send the action message.
|
||||||
// This also handles sending to the first responder is target is nil.
|
// This also handles sending to the first responder is target is nil.
|
||||||
[[UIApplication sharedApplication] sendAction:action to:target from:self forEvent:event];
|
if (target == [NSNull null])
|
||||||
|
[[UIApplication sharedApplication] sendAction:action to:nil from:self forEvent:event];
|
||||||
|
else
|
||||||
|
[[UIApplication sharedApplication] sendAction:action to:target from:self forEvent:event];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user