From 6395ce3aaef2b6fd28d7940212b384ec5dd69141 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sat, 4 Apr 2020 22:45:58 -0700 Subject: [PATCH] revert(chatlog): "feat: check chat status before start a search" This reverts commit ce570927b145676ff3a63f36a3fe082fa52b228a. --- src/widget/form/genericchatform.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index ae552d7e2..1b2ccaeb6 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -934,17 +934,7 @@ void GenericChatForm::onSearchTriggered() void GenericChatForm::searchInBegin(const QString& phrase, const ParameterSearch& parameter) { - if (phrase.isEmpty()) { - disableSearchText(); - - return; - } - - if (chatLog.getNextIdx().get() == messages.rbegin()->first.get() + 1) { - disableSearchText(); - } else { - goToCurrentDate(); - } + disableSearchText(); if (!parameter.time.isNull()) { LoadHistoryDialog::LoadType type = (parameter.period == PeriodSearch::BeforeDate) @@ -996,7 +986,7 @@ void GenericChatForm::onSearchUp(const QString& phrase, const ParameterSearch& p void GenericChatForm::onSearchDown(const QString& phrase, const ParameterSearch& parameter) { - auto result = chatLog.searchForward(searchPos, phrase, parameter); + auto result = chatLog.searchForward(searchPos, phrase, parameter); if (result.found && result.pos.logIdx.get() > messages.end()->first.get()) { const auto dt = chatLog.at(result.pos.logIdx).getTimestamp();