mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-28 16:42:20 +00:00
Merge commit 'fcf3ebab980b4cdf15bdb9da4ff1e6e9391356cd'
This commit is contained in:
commit
2a424340a3
@ -281,11 +281,15 @@ public struct StarsAmount: Equatable, Comparable, Hashable, Codable, CustomStrin
|
|||||||
}
|
}
|
||||||
|
|
||||||
public var stringValue: String {
|
public var stringValue: String {
|
||||||
|
return "\(totalValue)"
|
||||||
|
}
|
||||||
|
|
||||||
|
public var totalValue: Double {
|
||||||
if self.nanos == 0 {
|
if self.nanos == 0 {
|
||||||
return "\(self.value)"
|
return Double(self.value)
|
||||||
} else {
|
} else {
|
||||||
let totalValue = (Double(self.value) * 1e9 + Double(self.nanos)) / 1e9
|
let totalValue = (Double(self.value) * 1e9 + Double(self.nanos)) / 1e9
|
||||||
return "\(totalValue)"
|
return totalValue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user