修复添加索引目录后索引状态未更新的问题

This commit is contained in:
iaom 2023-05-15 11:35:06 +08:00
parent c66ef14a9f
commit 212b88020e
1 changed files with 2 additions and 0 deletions

View File

@ -55,9 +55,11 @@ void IndexScheduler::addNewPath(const QString &folders, const QStringList &black
BatchIndexer::Targets target = BatchIndexer::Target::None;
if(m_config->isFileIndexEnable()) {
target |= BatchIndexer::Target::Basic;
m_statusRecorder->setStatus(INDEX_DATABASE_STATE_KEY, IndexStatusRecorder::State::Updating);
}
if(m_config->isContentIndexEnable()) {
target |= BatchIndexer::Target::Content;
m_statusRecorder->setStatus(CONTENT_INDEX_DATABASE_STATE_KEY, IndexStatusRecorder::State::Updating);
}
BatchIndexer::WorkMode mode = BatchIndexer::WorkMode::Add;
startIndexJob(QStringList() << folders, blackList, mode, target);