mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed countdown label for input field of bio.
This commit is contained in:
parent
48eb408fb8
commit
eab249fc13
2 changed files with 8 additions and 1 deletions
|
@ -3892,7 +3892,13 @@ void HistoryWidget::saveEditMsg() {
|
||||||
if (remove > 0) {
|
if (remove > 0) {
|
||||||
controller()->showToast(
|
controller()->showToast(
|
||||||
tr::lng_edit_limit_reached(tr::now, lt_count, remove));
|
tr::lng_edit_limit_reached(tr::now, lt_count, remove));
|
||||||
|
#ifndef _DEBUG
|
||||||
return;
|
return;
|
||||||
|
#else
|
||||||
|
if (!base::IsCtrlPressed()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,8 @@ void SetupBio(
|
||||||
}
|
}
|
||||||
changed->fire(*current != text);
|
changed->fire(*current != text);
|
||||||
const auto limit = self->isPremium() ? premiumLimit : defaultLimit;
|
const auto limit = self->isPremium() ? premiumLimit : defaultLimit;
|
||||||
const auto countLeft = limit - int(text.size());
|
const auto countLeft = limit
|
||||||
|
- bio->lastTextSizeWithoutSurrogatePairsCount();
|
||||||
countdown->setText(QString::number(countLeft));
|
countdown->setText(QString::number(countLeft));
|
||||||
countdown->setTextColorOverride(
|
countdown->setTextColorOverride(
|
||||||
countLeft < 0 ? st::boxTextFgError->c : std::optional<QColor>());
|
countLeft < 0 ? st::boxTextFgError->c : std::optional<QColor>());
|
||||||
|
|
Loading…
Add table
Reference in a new issue