From 6e7e86175e07b8857580334bbf3e587d136f2634 Mon Sep 17 00:00:00 2001 From: overtake <> Date: Sun, 29 Mar 2020 11:29:23 +0400 Subject: [PATCH] graph zoom request bug fix [skip ci] --- .../Charts/Controllers/Lines/BaseLinesChartController.swift | 2 +- .../Controllers/Percent And Pie/PercentPieChartController.swift | 2 +- .../Controllers/Stacked Bars/DailyBarsChartController.swift | 2 +- .../Controllers/Stacked Bars/StackedBarsChartController.swift | 2 +- .../Controllers/Stacked Bars/StepBarsChartController.swift | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/submodules/GraphCore/Sources/Charts/Controllers/Lines/BaseLinesChartController.swift b/submodules/GraphCore/Sources/Charts/Controllers/Lines/BaseLinesChartController.swift index 0e3feb56b9..b8b0963833 100644 --- a/submodules/GraphCore/Sources/Charts/Controllers/Lines/BaseLinesChartController.swift +++ b/submodules/GraphCore/Sources/Charts/Controllers/Lines/BaseLinesChartController.swift @@ -135,7 +135,7 @@ public class BaseLinesChartController: BaseChartController { } public override func didTapZoomIn(date: Date, pointIndex: Int) { - guard isZoomed == false else { return } + guard !isZoomed, isZoomable else { return } setDetailsViewModel?(chartDetailsViewModel(closestDate: date, pointIndex: pointIndex, loading: true), false, false) diff --git a/submodules/GraphCore/Sources/Charts/Controllers/Percent And Pie/PercentPieChartController.swift b/submodules/GraphCore/Sources/Charts/Controllers/Percent And Pie/PercentPieChartController.swift index f965e801ac..768377efa3 100644 --- a/submodules/GraphCore/Sources/Charts/Controllers/Percent And Pie/PercentPieChartController.swift +++ b/submodules/GraphCore/Sources/Charts/Controllers/Percent And Pie/PercentPieChartController.swift @@ -245,7 +245,7 @@ public class PercentPieChartController: BaseChartController { } func didTapZoomIn(date: Date, animated: Bool) { - guard isZoomed == false else { return } + guard !isZoomed, isZoomable else { return } cancelChartInteraction() let currentCollection = percentController.chartsCollection let range: Int = Constants.zoomedRange diff --git a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/DailyBarsChartController.swift b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/DailyBarsChartController.swift index fa521882ca..d4b9b8a3b3 100644 --- a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/DailyBarsChartController.swift +++ b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/DailyBarsChartController.swift @@ -206,7 +206,7 @@ public class DailyBarsChartController: BaseChartController { } public override func didTapZoomIn(date: Date, pointIndex: Int) { - guard isZoomed == false else { return } + guard !isZoomed, isZoomable else { return } if isZoomed { return linesController.hideDetailsView(animated: true) } diff --git a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StackedBarsChartController.swift b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StackedBarsChartController.swift index 7571f98c0c..d62f108b76 100644 --- a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StackedBarsChartController.swift +++ b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StackedBarsChartController.swift @@ -221,7 +221,7 @@ public class StackedBarsChartController: BaseChartController { } public override func didTapZoomIn(date: Date, pointIndex: Int) { - guard isZoomed == false else { return } + guard !isZoomed, isZoomable else { return } if isZoomed { return zoomedBarsController.hideDetailsView(animated: true) } diff --git a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StepBarsChartController.swift b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StepBarsChartController.swift index 60a9888048..e929b3e633 100644 --- a/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StepBarsChartController.swift +++ b/submodules/GraphCore/Sources/Charts/Controllers/Stacked Bars/StepBarsChartController.swift @@ -229,7 +229,7 @@ public class StepBarsChartController: BaseChartController { } public override func didTapZoomIn(date: Date, pointIndex: Int) { - guard isZoomed == false else { return } + guard !isZoomed, isZoomable else { return } if isZoomed { return zoomedBarsController.hideDetailsView(animated: true) }