mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
revert(chatlog): "feat: check chat status before start a search"
This reverts commit ce570927b145676ff3a63f36a3fe082fa52b228a.
This commit is contained in:
parent
37b58ee8ee
commit
59efeeb3e7
@ -952,17 +952,7 @@ void GenericChatForm::onSearchTriggered()
|
|||||||
|
|
||||||
void GenericChatForm::searchInBegin(const QString& phrase, const ParameterSearch& parameter)
|
void GenericChatForm::searchInBegin(const QString& phrase, const ParameterSearch& parameter)
|
||||||
{
|
{
|
||||||
if (phrase.isEmpty()) {
|
disableSearchText();
|
||||||
disableSearchText();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (chatLog.getNextIdx() == messages.rbegin()->first + 1) {
|
|
||||||
disableSearchText();
|
|
||||||
} else {
|
|
||||||
goToCurrentDate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!parameter.time.isNull()) {
|
if (!parameter.time.isNull()) {
|
||||||
LoadHistoryDialog::LoadType type = (parameter.period == PeriodSearch::BeforeDate)
|
LoadHistoryDialog::LoadType type = (parameter.period == PeriodSearch::BeforeDate)
|
||||||
@ -1014,7 +1004,7 @@ void GenericChatForm::onSearchUp(const QString& phrase, const ParameterSearch& p
|
|||||||
|
|
||||||
void GenericChatForm::onSearchDown(const QString& phrase, const ParameterSearch& parameter)
|
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()) {
|
if (result.found && result.pos.logIdx.get() > messages.end()->first.get()) {
|
||||||
const auto dt = chatLog.at(result.pos.logIdx).getTimestamp();
|
const auto dt = chatLog.at(result.pos.logIdx).getTimestamp();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user