Skip to content

Commit 15da381

Browse files
committed
[lock state] reuse previously calculated ExpandedPercentage
for GestureStatus.Completed logic
1 parent b570b4f commit 15da381

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Xam.Plugin.SimpleBottomDrawer/BottomDrawer.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,14 +316,10 @@ object sender
316316
, easing: Easing.SpringOut);
317317
}
318318

319-
// Note: [alex-d] this.TranslationY might change due to this.TranslateTo()
319+
// Note: [alex-d] |this.TranslationY| seems to not change due to |this.TranslateTo()|
320+
// so it is ok to reuse the |tmpLockState| value
320321
// -
321-
double dragDistanceY2 = e.TotalY + this.TranslationY;
322-
323-
#if DEBUG
324-
System.Console.WriteLine($"[BottomDrawer] OnPanChanged() - call#2 GetClosestLockState({dragDistanceY2})");
325-
#endif
326-
this.ExpandedPercentage = GetClosestLockStateAbsolute(dragDistanceY2);
322+
this.ExpandedPercentage = tmpLockState;
327323
this.isDragging = false;
328324

329325
#if DEBUG

0 commit comments

Comments
 (0)