mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +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) {
|
||||
_botMenuButton->show();
|
||||
}
|
||||
if (_silent) {
|
||||
_silent->setVisible(!_editMsgId);
|
||||
}
|
||||
if (_scheduled) {
|
||||
_scheduled->setVisible(!_editMsgId);
|
||||
}
|
||||
if (_ttlInfo) {
|
||||
_ttlInfo->setVisible(!_editMsgId);
|
||||
{
|
||||
auto rightButtonsChanged = false;
|
||||
if (_silent) {
|
||||
const auto was = _silent->isVisible();
|
||||
const auto now = (!_editMsgId);
|
||||
if (was != now) {
|
||||
_silent->setVisible(now);
|
||||
rightButtonsChanged = true;
|
||||
}
|
||||
}
|
||||
if (_scheduled) {
|
||||
const auto was = _scheduled->isVisible();
|
||||
const auto now = (!_editMsgId);
|
||||
if (was != now) {
|
||||
_scheduled->setVisible(now);
|
||||
rightButtonsChanged = true;
|
||||
}
|
||||
}
|
||||
if (_ttlInfo) {
|
||||
const auto was = _ttlInfo->isVisible();
|
||||
const auto now = (!_editMsgId);
|
||||
if (was != now) {
|
||||
_ttlInfo->setVisible(now);
|
||||
rightButtonsChanged = true;
|
||||
}
|
||||
}
|
||||
if (rightButtonsChanged) {
|
||||
updateFieldSize();
|
||||
}
|
||||
}
|
||||
if (_sendAs) {
|
||||
_sendAs->show();
|
||||
|
|
Loading…
Add table
Reference in a new issue