mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
just additional thing for starsAmount
This commit is contained in:
@@ -281,11 +281,15 @@ public struct StarsAmount: Equatable, Comparable, Hashable, Codable, CustomStrin
|
||||
}
|
||||
|
||||
public var stringValue: String {
|
||||
return "\(totalValue)"
|
||||
}
|
||||
|
||||
public var totalValue: Double {
|
||||
if self.nanos == 0 {
|
||||
return "\(self.value)"
|
||||
return Double(self.value)
|
||||
} else {
|
||||
let totalValue = (Double(self.value) * 1e9 + Double(self.nanos)) / 1e9
|
||||
return "\(totalValue)"
|
||||
return totalValue
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user