mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-06 23:24:01 +02:00
Fixed width updating of message field with hidden right buttons.
This commit is contained in:
parent
39f494eadd
commit
6d69a78a05
1 changed files with 29 additions and 8 deletions
|
@ -2848,14 +2848,35 @@ void HistoryWidget::updateControlsVisibility() {
|
||||||
if (_botMenuButton) {
|
if (_botMenuButton) {
|
||||||
_botMenuButton->show();
|
_botMenuButton->show();
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
auto rightButtonsChanged = false;
|
||||||
if (_silent) {
|
if (_silent) {
|
||||||
_silent->setVisible(!_editMsgId);
|
const auto was = _silent->isVisible();
|
||||||
|
const auto now = (!_editMsgId);
|
||||||
|
if (was != now) {
|
||||||
|
_silent->setVisible(now);
|
||||||
|
rightButtonsChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_scheduled) {
|
if (_scheduled) {
|
||||||
_scheduled->setVisible(!_editMsgId);
|
const auto was = _scheduled->isVisible();
|
||||||
|
const auto now = (!_editMsgId);
|
||||||
|
if (was != now) {
|
||||||
|
_scheduled->setVisible(now);
|
||||||
|
rightButtonsChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_ttlInfo) {
|
if (_ttlInfo) {
|
||||||
_ttlInfo->setVisible(!_editMsgId);
|
const auto was = _ttlInfo->isVisible();
|
||||||
|
const auto now = (!_editMsgId);
|
||||||
|
if (was != now) {
|
||||||
|
_ttlInfo->setVisible(now);
|
||||||
|
rightButtonsChanged = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rightButtonsChanged) {
|
||||||
|
updateFieldSize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (_sendAs) {
|
if (_sendAs) {
|
||||||
_sendAs->show();
|
_sendAs->show();
|
||||||
|
|
Loading…
Add table
Reference in a new issue