Skip to content

Commit

Permalink
Fix bad merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelkang committed Sep 27, 2023
1 parent 84acf08 commit b1cdd72
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -627,28 +627,32 @@ _handler.VirtualView is View v &&

var nativeRecognizers = GetPlatformRecognizer(recognizer);

if (nativeRecognizers is null)
continue;

foreach (UIGestureRecognizer? nativeRecognizer in nativeRecognizers)
if (nativeRecognizer != null && PlatformView != null)
{
if (nativeRecognizer != null && PlatformView != null)
{
nativeRecognizer.ShouldReceiveTouch = _shouldReceiveTouch;
PlatformView.AddGestureRecognizer(nativeRecognizer);
nativeRecognizer.ShouldReceiveTouch = _shouldReceiveTouch;
PlatformView.AddGestureRecognizer(nativeRecognizer);

_gestureRecognizers[recognizer] = nativeRecognizer;
}
_gestureRecognizers[recognizer] = nativeRecognizer;
}

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DragGestureRecognizer)
if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DragGestureRecognizer)
{
dragFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDragInteraction == null && PlatformView != null)
{
var interaction = new UIDragInteraction(_dragAndDropDelegate);
interaction.Enabled = true;
_interactions.Add(interaction);
PlatformView.AddInteraction(interaction);
}
}

if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DropGestureRecognizer)
if (OperatingSystem.IsIOSVersionAtLeast(11) && recognizer is DropGestureRecognizer)
{
dropFound = true;
_dragAndDropDelegate = _dragAndDropDelegate ?? new DragAndDropDelegate(_handler);
if (uIDropInteraction == null && PlatformView != null)
{
var interaction = new UIDropInteraction(_dragAndDropDelegate);
_interactions.Add(interaction);
Expand Down

0 comments on commit b1cdd72

Please sign in to comment.