Fix a crash in some chat switchings.

This commit is contained in:
John Preston 2025-03-07 23:56:17 +04:00
parent b0d7c3e9b1
commit cc4a5f30b6

View file

@ -5194,7 +5194,9 @@ void HistoryWidget::updateSendButtonType() {
: 0;
}();
const auto perMessage = _peer ? _peer->starsPerMessageChecked() : 0;
const auto messages = _voiceRecordBar->isListenState()
const auto messages = !_peer
? 0
: _voiceRecordBar->isListenState()
? 1
: ComputeSendingMessagesCount(_history, {
.forward = &_forwardPanel->items(),