mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
fix: crash on new dialog
This commit is contained in:
@@ -3892,10 +3892,11 @@ void HistoryWidget::send(Api::SendOptions options) {
|
||||
options.scheduled = current + 12;
|
||||
}
|
||||
|
||||
if (!settings->sendReadMessages && settings->markReadAfterSend)
|
||||
auto lastMessage = _history->lastMessage();
|
||||
if (!settings->sendReadMessages && settings->markReadAfterSend && lastMessage)
|
||||
{
|
||||
AyuState::setAllowSendReadPacket(true);
|
||||
_history->session().data().histories().readInboxOnNewMessage(_history->lastMessage());
|
||||
_history->session().data().histories().readInboxOnNewMessage(lastMessage);
|
||||
}
|
||||
|
||||
if (!_history) {
|
||||
|
||||
Reference in New Issue
Block a user