mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
QString ToUsd(EarnInt value, float64 rate) {
|
||||||
constexpr auto kApproximately = QChar(0x2248);
|
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)
|
return QString(kApproximately)
|
||||||
+ QChar('$')
|
+ QChar('$')
|
||||||
+ MajorPart(result)
|
+ MajorPart(result)
|
||||||
|
|
Loading…
Add table
Reference in a new issue