mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Moved download deregistration to ContentManager
This commit is contained in:
parent
4842742e77
commit
d3c4361d60
@ -666,6 +666,8 @@ void ContentManager::cancelBook(const QString& id)
|
||||
if (download->getStatus() != kiwix::Download::K_COMPLETE) {
|
||||
download->cancelDownload();
|
||||
}
|
||||
m_downloads.remove(id);
|
||||
|
||||
QString dirPath = QString::fromStdString(kiwix::removeLastPathElement(download->getPath()));
|
||||
QString filename = QString::fromStdString(kiwix::getLastPathElement(download->getPath())) + "*";
|
||||
// incompleted downloaded file should be perma deleted
|
||||
|
@ -282,7 +282,6 @@ void ContentManagerModel::resumeDownload(QModelIndex index)
|
||||
|
||||
void ContentManagerModel::removeDownload(QString bookId)
|
||||
{
|
||||
m_downloads.remove(bookId);
|
||||
const auto it = bookIdToRowMap.constFind(bookId);
|
||||
if ( it == bookIdToRowMap.constEnd() )
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user