Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Jun 18, 2024
1 parent 1640326 commit 3cd5e54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DXFeedFrameworkTests/DXMarketDepthTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ final class DXMarketDepthTest: XCTestCase, MarketDepthListener {
count: bookSize))
var expectedBuy = 0
var expectedSell = 0
for position in 0..<10000 {
for _ in 0..<10000 {
let index = Int.random(in: 0..<bookSize)
let size = Int.random(in: 1..<10)
// Note: every 1/10 order will have size == 0 and will "remove"
Expand Down
7 changes: 4 additions & 3 deletions Samples/DXFeedCandleChartMac/CandleChart.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ struct CandleChart: View {
.chartYScale(domain: list.yScale())
.chartYAxis { AxisMarks(preset: .extended) }
.chartXAxis {
if list.loadingInProgress {
} else {
if !list.loadingInProgress {
let xAxisValues = self.list.xAxisLabels
AxisMarks(preset: .aligned, values: xAxisValues) { value in
if let strDate = value.as(String.self) {
Expand Down Expand Up @@ -188,7 +187,7 @@ struct CandleChart: View {
.onEnded { value in
let element = findElement(location: value.location, proxy: proxy, geometry: geo)
if selectedPrice?.timestamp == element?.timestamp {
// If tapping the same element, clear the selection.
// If tapping the same element, clean the selection.
selectedPrice = nil
} else {
selectedPrice = element
Expand Down Expand Up @@ -328,6 +327,7 @@ struct CandlePlot: ChartContent {
}

static let openCloseWidth: CGFloat = {
// iOS16 doesn't support scroll on chart and content will show on the same screen
if #available(iOS 17, *) {
return 6
} else {
Expand All @@ -336,6 +336,7 @@ struct CandlePlot: ChartContent {
}()

static let highLowWidth: CGFloat = {
// iOS16 doesn't support scroll on chart and content will show on the same screen
if #available(iOS 17, *) {
return 2
} else {
Expand Down

0 comments on commit 3cd5e54

Please sign in to comment.