mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-08-03 12:46:29 -04:00
Library::updateFromDir() emits booksChanged() signal once per call
The purpose of LibraryManipulator defined in library.cpp was to emit the booksChanged() signal for every book added to the library. In Library::updateFromDir() we can do that once per call of that function.
This commit is contained in:
parent
1e8a181d1a
commit
f38b7480f6
@ -225,7 +225,7 @@ void Library::updateFromDir(QString monitorDir)
|
||||
}
|
||||
const QStringSet addedZims = newDirEntries - oldDirEntries;
|
||||
const QStringSet removedZims = oldDirEntries - newDirEntries;
|
||||
kiwix::Manager manager(LibraryManipulator(this));
|
||||
kiwix::Manager manager(getKiwixLibrary());
|
||||
bool needsRefresh = !removedZims.empty();
|
||||
for (auto bookPath : addedZims) {
|
||||
if ( isBeingDownloadedByUs(bookPath) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user