mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Chart fixes
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
import GraphCore
|
||||
import Display
|
||||
|
||||
private enum Constants {
|
||||
static let chartViewHeightFraction: CGFloat = 0.55
|
||||
@@ -36,6 +37,8 @@ class ChartStackSection: UIView, ChartThemeContainer {
|
||||
|
||||
var displayRange: Bool = true
|
||||
|
||||
let hapticFeedback = HapticFeedback()
|
||||
|
||||
init() {
|
||||
sectionContainerView = UIView()
|
||||
chartView = ChartView()
|
||||
@@ -188,8 +191,11 @@ class ChartStackSection: UIView, ChartThemeContainer {
|
||||
controller.chartFrame = { [unowned self] in
|
||||
return self.chartView.chartFrame
|
||||
}
|
||||
controller.setDetailsViewModel = { [unowned self] viewModel, animated in
|
||||
controller.setDetailsViewModel = { [unowned self] viewModel, animated, feedback in
|
||||
self.chartView.setDetailsViewModel(viewModel: viewModel, animated: animated)
|
||||
if feedback {
|
||||
self.hapticFeedback.tap()
|
||||
}
|
||||
}
|
||||
controller.setDetailsChartVisibleClosure = { [unowned self] visible, animated in
|
||||
self.chartView.setDetailsChartVisible(visible, animated: animated)
|
||||
|
||||
Reference in New Issue
Block a user