mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
feat: check chat status before start a search
This commit is contained in:
parent
e3c35c9153
commit
76679de2e0
|
@ -940,7 +940,17 @@ void GenericChatForm::onSearchTriggered()
|
|||
|
||||
void GenericChatForm::searchInBegin(const QString& phrase, const ParameterSearch& parameter)
|
||||
{
|
||||
disableSearchText();
|
||||
if (phrase.isEmpty()) {
|
||||
disableSearchText();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (chatLog.getNextIdx().get() == messages.rbegin()->first.get() + 1) {
|
||||
disableSearchText();
|
||||
} else {
|
||||
goToCurrentDate();
|
||||
}
|
||||
|
||||
if (!parameter.time.isNull()) {
|
||||
LoadHistoryDialog::LoadType type = (parameter.period == PeriodSearch::BeforeDate)
|
||||
|
|
Loading…
Reference in New Issue
Block a user