mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Don't apply entry from dialogs if postponed.
This commit is contained in:
@@ -297,6 +297,10 @@ void Histories::sendDialogRequests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Histories::dialogEntryApplied(not_null<History*> history) {
|
void Histories::dialogEntryApplied(not_null<History*> history) {
|
||||||
|
const auto state = lookup(history);
|
||||||
|
if (state->postponedRequestEntry) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
history->dialogEntryApplied();
|
history->dialogEntryApplied();
|
||||||
if (const auto callbacks = _dialogRequestsPending.take(history)) {
|
if (const auto callbacks = _dialogRequestsPending.take(history)) {
|
||||||
for (const auto &callback : *callbacks) {
|
for (const auto &callback : *callbacks) {
|
||||||
@@ -308,11 +312,9 @@ void Histories::dialogEntryApplied(not_null<History*> history) {
|
|||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (const auto state = lookup(history)) {
|
if (state && state->sentReadTill && state->sentReadDone) {
|
||||||
if (state->sentReadTill && state->sentReadDone) {
|
history->setInboxReadTill(base::take(state->sentReadTill));
|
||||||
history->setInboxReadTill(base::take(state->sentReadTill));
|
checkEmptyState(history);
|
||||||
checkEmptyState(history);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user