mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Fire notification when no update but writeTime
change
This commit is contained in:
parent
c5fa273723
commit
9058fce037
1 changed files with 13 additions and 7 deletions
|
@ -1209,6 +1209,7 @@ async function diffUpdater() {
|
|||
assetDetails.fetch = false;
|
||||
toSoftUpdate.push(assetDetails);
|
||||
} else {
|
||||
assetDetails.fetch = true;
|
||||
toHardUpdate.push(assetDetails);
|
||||
}
|
||||
}
|
||||
|
@ -1265,14 +1266,19 @@ async function diffUpdater() {
|
|||
assetCacheSetDetails(data.name, metadata);
|
||||
updaterUpdated.push(data.name);
|
||||
} else if ( data.error ) {
|
||||
ubolog(`Diff updater: failed to diff-update ${data.name} using ${data.patchPath}, reason: ${data.error}`);
|
||||
ubolog(`Diff updater: failed to update ${data.name} using ${data.patchPath}, reason: ${data.error}`);
|
||||
} else if ( data.status === 'nopatch-yet' || data.status === 'nodiff' ) {
|
||||
ubolog(`Diff updater: Skip update of ${data.name} using ${data.patchPath}, reason: ${data.status}`);
|
||||
assetCacheSetDetails(data.name, {
|
||||
writeTime: data.lastModified || 0
|
||||
});
|
||||
vAPI.messaging.broadcast({
|
||||
what: 'assetUpdated',
|
||||
key: data.name,
|
||||
cached: true,
|
||||
});
|
||||
} else {
|
||||
ubolog(`Diff updater: Skip diff-updating ${data.name} using ${data.patchPath}, reason: ${data.status}`);
|
||||
if ( data.status === 'nopatch-yet' || data.status === 'nodiff' ) {
|
||||
assetCacheSetDetails(data.name, {
|
||||
writeTime: data.lastModified || 0
|
||||
});
|
||||
}
|
||||
ubolog(`Diff updater: ${data.name} / ${data.patchPath} / ${data.status}`);
|
||||
}
|
||||
pendingOps -= 1;
|
||||
if ( pendingOps === 0 && toSoftUpdate.length !== 0 ) {
|
||||
|
|
Loading…
Reference in a new issue