|
|
|
@ -1004,13 +1004,7 @@ void GenericChatForm::onSearchUp(const QString& phrase, const ParameterSearch& p
@@ -1004,13 +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); |
|
|
|
|
|
|
|
|
|
if (result.found && result.pos.logIdx.get() > messages.end()->first.get()) { |
|
|
|
|
const auto dt = chatLog.at(result.pos.logIdx).getTimestamp(); |
|
|
|
|
loadHistory(dt, LoadHistoryDialog::from); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
auto result = chatLog.searchForward(searchPos, phrase, parameter); |
|
|
|
|
handleSearchResult(result, SearchDirection::Down); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1032,7 +1026,6 @@ void GenericChatForm::handleSearchResult(SearchResult result, SearchDirection di
@@ -1032,7 +1026,6 @@ void GenericChatForm::handleSearchResult(SearchResult result, SearchDirection di
|
|
|
|
|
chatWidget->scrollToLine(msg); |
|
|
|
|
|
|
|
|
|
auto text = qobject_cast<Text*>(msg->getContent(1)); |
|
|
|
|
text->visibilityChanged(true); |
|
|
|
|
text->selectText(result.exp, std::make_pair(result.start, result.len)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|