mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
fix: crash on new dialog
This commit is contained in:
parent
17a9c5c382
commit
34fa52e5fb
1 changed files with 3 additions and 2 deletions
|
@ -3892,10 +3892,11 @@ void HistoryWidget::send(Api::SendOptions options) {
|
||||||
options.scheduled = current + 12;
|
options.scheduled = current + 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!settings->sendReadMessages && settings->markReadAfterSend)
|
auto lastMessage = _history->lastMessage();
|
||||||
|
if (!settings->sendReadMessages && settings->markReadAfterSend && lastMessage)
|
||||||
{
|
{
|
||||||
AyuState::setAllowSendReadPacket(true);
|
AyuState::setAllowSendReadPacket(true);
|
||||||
_history->session().data().histories().readInboxOnNewMessage(_history->lastMessage());
|
_history->session().data().histories().readInboxOnNewMessage(lastMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_history) {
|
if (!_history) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue