mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 05:07:10 +02:00
Don't auto-submit /start on non-loaded history.
This commit is contained in:
parent
2729bcac3b
commit
e46d5a86d3
1 changed files with 8 additions and 2 deletions
|
@ -4042,7 +4042,10 @@ void HistoryWidget::preloadHistoryIfNeeded() {
|
|||
preloadHistoryByScroll();
|
||||
checkReplyReturns();
|
||||
}
|
||||
if (clearMaybeSendStart() && !_history->isDisplayedEmpty()) {
|
||||
const auto hasNonEmpty = _history->findFirstNonEmpty();
|
||||
const auto readyForBotStart = hasNonEmpty
|
||||
|| (_history->loadedAtTop() && _history->loadedAtBottom());
|
||||
if (readyForBotStart && clearMaybeSendStart() && hasNonEmpty) {
|
||||
sendBotStartCommand();
|
||||
}
|
||||
}
|
||||
|
@ -8373,7 +8376,10 @@ void HistoryWidget::fullInfoUpdated() {
|
|||
handlePeerUpdate();
|
||||
checkSuggestToGigagroup();
|
||||
|
||||
if (clearMaybeSendStart() && !_history->isDisplayedEmpty()) {
|
||||
const auto hasNonEmpty = _history->findFirstNonEmpty();
|
||||
const auto readyForBotStart = hasNonEmpty
|
||||
|| (_history->loadedAtTop() && _history->loadedAtBottom());
|
||||
if (readyForBotStart && clearMaybeSendStart() && hasNonEmpty) {
|
||||
sendBotStartCommand();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue