mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added notification when new extra file is shared, so that shared files updates
This commit is contained in:
parent
fd2eed8b24
commit
9533fc9c00
4 changed files with 53 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -184,6 +184,8 @@ enum class RsSharedDirectoriesEventCode: uint8_t {
|
|||
HASHING_FILE = 0x02, // mMessage: full path and hashing speed of the file being hashed
|
||||
DIRECTORY_SWEEP_ENDED = 0x03, // (void)
|
||||
SAVING_FILE_INDEX = 0x04, // (void)
|
||||
EXTRA_LIST_FILE_ADDED = 0x05, // (void)
|
||||
EXTRA_LIST_FILE_REMOVED = 0x06, // (void)
|
||||
};
|
||||
|
||||
enum class RsFileTransferEventCode: uint8_t {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue