mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fixed currency formatting for channel earn info section.
This commit is contained in:
parent
bdf5872f04
commit
7ffa9844e2
1 changed files with 5 additions and 2 deletions
|
@ -48,8 +48,11 @@ QString MinorPart(EarnInt value) {
|
|||
|
||||
QString ToUsd(EarnInt value, float64 rate) {
|
||||
constexpr auto kApproximately = QChar(0x2248);
|
||||
const auto multiplier = EarnInt(rate * Data::kEarnMultiplier);
|
||||
const auto result = (value * multiplier) / Data::kEarnMultiplier;
|
||||
|
||||
const auto result = value
|
||||
/ float64(Data::kEarnMultiplier)
|
||||
* rate
|
||||
* Data::kEarnMultiplier;
|
||||
return QString(kApproximately)
|
||||
+ QChar('$')
|
||||
+ MajorPart(result)
|
||||
|
|
Loading…
Add table
Reference in a new issue