added notification when new extra file is shared, so that shared files updates

This commit is contained in:
csoler 2020-12-04 16:33:12 +01:00
parent fd2eed8b24
commit 9533fc9c00
4 changed files with 53 additions and 3 deletions

View file

@ -129,6 +129,11 @@ void ftExtraList::hashAFile()
mHashedList[details.info.path] = details.info.hash;
IndicateConfigChanged();
auto ev = std::make_shared<RsSharedDirectoriesEvent>();
ev->mEventCode = RsSharedDirectoriesEventCode::EXTRA_LIST_FILE_ADDED;
if(rsEvents)
rsEvents->postEvent(ev);
}
}
@ -195,6 +200,12 @@ bool ftExtraList::removeExtraFile(const RsFileHash& hash)
IndicateConfigChanged();
if(rsEvents)
{
auto ev = std::make_shared<RsSharedDirectoriesEvent>();
ev->mEventCode = RsSharedDirectoriesEventCode::EXTRA_LIST_FILE_REMOVED;
rsEvents->postEvent(ev);
}
return true;
}