mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed display of integer numbers in channel earn section.
This commit is contained in:
parent
e32de38d04
commit
d675e31a51
1 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@ namespace Info::ChannelEarn {
|
|||
using EarnInt = Data::EarnInt;
|
||||
|
||||
constexpr auto kMinorPartLength = 9;
|
||||
constexpr auto kMaxChoppedZero = kMinorPartLength - 2;
|
||||
constexpr auto kZero = QChar('0');
|
||||
constexpr auto kDot = QChar('.');
|
||||
|
||||
|
@ -35,7 +36,7 @@ QString MinorPart(EarnInt value) {
|
|||
auto ch = end - 1;
|
||||
auto zeroCount = 0;
|
||||
while (ch != begin) {
|
||||
if ((*ch) == kZero) {
|
||||
if (((*ch) == kZero) && (zeroCount < kMaxChoppedZero)) {
|
||||
zeroCount++;
|
||||
} else {
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue