VERIFY.md, attachSignature-Fix, Sync-Hashes, Scope-Bug
- VERIFY.md: Regressions-Checkliste mit 30 Prüfpunkten - Fix: attachSignature: false beim Signatur-Update (deaktiviert alte Datei-Signatur) - Fix: Sig-Hashes werden beim Init + Background-Sync geschrieben (kein grau mehr) - Fix: Scope-Badge Vergleich über normalisierte Scopes (folderToScope) - Fix: storage.onChanged refreshed auch Signaturen-Indicator
This commit is contained in:
@@ -1193,7 +1193,8 @@ document.getElementById('sig-save-button').addEventListener('click', async () =>
|
||||
|
||||
await browser.identities.update(identityId, {
|
||||
signature: fullSignature,
|
||||
signatureIsPlainText: false
|
||||
signatureIsPlainText: false,
|
||||
attachSignature: false
|
||||
});
|
||||
|
||||
if (identity) identity.signature = fullSignature;
|
||||
@@ -1674,17 +1675,30 @@ window.addEventListener('load', async () => {
|
||||
loadSyncConfig();
|
||||
await loadIdentities();
|
||||
|
||||
// Always init sig hashes from current identities
|
||||
if (allIdentities.length > 0) {
|
||||
for (const id of allIdentities) {
|
||||
sigSyncedHashes[id.email.toLowerCase()] = simpleHash(id.signature || '');
|
||||
}
|
||||
saveSyncHashes();
|
||||
}
|
||||
updateSigSyncIndicator();
|
||||
|
||||
checkForServerUpdates();
|
||||
setInterval(checkForServerUpdates, 30000);
|
||||
|
||||
// Auto-refresh UI when background sync updates hashes (fires after templates + hashes are both written)
|
||||
// Auto-refresh UI when background sync updates storage
|
||||
let refreshing = false;
|
||||
browser.storage.onChanged.addListener(async (changes, area) => {
|
||||
if (area !== 'local') return;
|
||||
if (changes[HASH_STORAGE_KEY]) {
|
||||
if (area !== 'local' || refreshing) return;
|
||||
if (changes[HASH_STORAGE_KEY] || changes[TEMPLATE_STORAGE_KEY]) {
|
||||
refreshing = true;
|
||||
await loadSyncHashes();
|
||||
const templates = await getTemplates();
|
||||
renderTemplates(templates);
|
||||
updateTplSyncIndicator();
|
||||
updateSigSyncIndicator();
|
||||
refreshing = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user