Implement channel stories views / reactions.
This commit is contained in:
@@ -937,6 +937,10 @@ ShortenedCount FormatCountToShort(int64 number) {
|
||||
return result;
|
||||
}
|
||||
|
||||
QString FormatCountDecimal(int64 number) {
|
||||
return QString("%L1").arg(number);
|
||||
}
|
||||
|
||||
PluralResult Plural(
|
||||
ushort keyBase,
|
||||
float64 value,
|
||||
@@ -973,7 +977,7 @@ PluralResult Plural(
|
||||
if (type == lt_count_short) {
|
||||
return { shift, shortened.string };
|
||||
} else if (type == lt_count_decimal) {
|
||||
return { shift, QString("%L1").arg(round) };
|
||||
return { shift, FormatCountDecimal(round) };
|
||||
}
|
||||
return { shift, QString::number(round) };
|
||||
}
|
||||
|
||||
@@ -14,13 +14,16 @@ namespace Lang {
|
||||
inline constexpr auto kTextCommandLangTag = 0x20;
|
||||
constexpr auto kTagReplacementSize = 4;
|
||||
|
||||
int FindTagReplacementPosition(const QString &original, ushort tag);
|
||||
[[nodiscard]] int FindTagReplacementPosition(
|
||||
const QString &original,
|
||||
ushort tag);
|
||||
|
||||
struct ShortenedCount {
|
||||
int64 number = 0;
|
||||
QString string;
|
||||
};
|
||||
ShortenedCount FormatCountToShort(int64 number);
|
||||
[[nodiscard]] ShortenedCount FormatCountToShort(int64 number);
|
||||
[[nodiscard]] QString FormatCountDecimal(int64 number);
|
||||
|
||||
struct PluralResult {
|
||||
int keyShift = 0;
|
||||
|
||||
Reference in New Issue
Block a user