mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix bot buttons disappearing on chat switch.
This commit is contained in:
parent
6f797a17ad
commit
fb283c4828
1 changed files with 4 additions and 0 deletions
|
@ -4058,6 +4058,7 @@ void HistoryWidget::showFinished() {
|
||||||
|
|
||||||
void HistoryWidget::doneShow() {
|
void HistoryWidget::doneShow() {
|
||||||
_topBar->setAnimatingMode(false);
|
_topBar->setAnimatingMode(false);
|
||||||
|
updateCanSendMessage();
|
||||||
updateBotKeyboard();
|
updateBotKeyboard();
|
||||||
updateControlsVisibility();
|
updateControlsVisibility();
|
||||||
if (!_historyInited) {
|
if (!_historyInited) {
|
||||||
|
@ -7362,6 +7363,9 @@ void HistoryWidget::handlePeerUpdate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HistoryWidget::updateCanSendMessage() {
|
bool HistoryWidget::updateCanSendMessage() {
|
||||||
|
if (!_peer) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const auto replyTo = (_replyToId && !_editMsgId) ? _replyEditMsg : 0;
|
const auto replyTo = (_replyToId && !_editMsgId) ? _replyEditMsg : 0;
|
||||||
const auto topic = replyTo ? replyTo->topic() : nullptr;
|
const auto topic = replyTo ? replyTo->topic() : nullptr;
|
||||||
const auto allWithoutPolls = Data::AllSendRestrictions()
|
const auto allWithoutPolls = Data::AllSendRestrictions()
|
||||||
|
|
Loading…
Add table
Reference in a new issue