Skip to content

Commit

Permalink
IOS-3375 Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-pusya committed Oct 16, 2024
1 parent 43d2ce8 commit ca24b4e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

extension NumberFormatter {
static let `default`: NumberFormatter = {
static let decimalWithNoSeparator: NumberFormatter = {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal
formatter.groupingSeparator = ""
Expand Down
2 changes: 1 addition & 1 deletion Anytype/Sources/Models/Relations/RelationsBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class RelationsBuilder: RelationsBuilderProtocol {

private let dateFormatter = DateFormatter.relationDateFormatter

private let numberFormatter = NumberFormatter.default
private let numberFormatter = NumberFormatter.decimalWithNoSeparator

// MARK: - Internal functions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ final class TextRelationEditingService: TextRelationEditingServiceProtocol {
@Injected(\.relationsService)
private var service: any RelationsServiceProtocol

private let numberFormatter = NumberFormatter.default
private let numberFormatter = NumberFormatter.decimalWithNoSeparator

// MARK: - TextRelationDetailsServiceProtocol

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class RelationFilterBuilder {
return dateFormatter
}()

private let numberFormatter = NumberFormatter.default
private let numberFormatter = NumberFormatter.decimalWithNoSeparator

func relation(
detailsStorage: ObjectDetailsStorage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class SetFiltersTextViewModel: ObservableObject {
switch filter.conditionType {
case .number:
if let doubleValue = filter.filter.value.safeDoubleValue {
return NumberFormatter.default.string(from: NSNumber(floatLiteral: doubleValue)) ?? ""
return NumberFormatter.decimalWithNoSeparator.string(from: NSNumber(floatLiteral: doubleValue)) ?? ""
} else {
return ""
}
Expand Down

0 comments on commit ca24b4e

Please sign in to comment.