Browse Source

revert(chatlog): "feat: check chat status before start a search"

This reverts commit ce570927b1.
reviewable/pr6374/r3
Anthony Bilinski 6 years ago
parent
commit
59efeeb3e7
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 14
      src/widget/form/genericchatform.cpp

14
src/widget/form/genericchatform.cpp

@ -952,17 +952,7 @@ void GenericChatForm::onSearchTriggered() @@ -952,17 +952,7 @@ void GenericChatForm::onSearchTriggered()
void GenericChatForm::searchInBegin(const QString& phrase, const ParameterSearch& parameter)
{
if (phrase.isEmpty()) {
disableSearchText();
return;
}
if (chatLog.getNextIdx() == messages.rbegin()->first + 1) {
disableSearchText();
} else {
goToCurrentDate();
}
disableSearchText();
if (!parameter.time.isNull()) {
LoadHistoryDialog::LoadType type = (parameter.period == PeriodSearch::BeforeDate)
@ -1014,7 +1004,7 @@ void GenericChatForm::onSearchUp(const QString& phrase, const ParameterSearch& p @@ -1014,7 +1004,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();

Loading…
Cancel
Save