Revert: isSame/isEdited util
This commit is contained in:
parent
4a8894de2e
commit
1dd0dbf907
|
@ -23,14 +23,6 @@ var updater = {
|
||||||
|
|
||||||
lastUpdateTime: parseInt(localStorage.lastUpdateTime) || Date.now(),
|
lastUpdateTime: parseInt(localStorage.lastUpdateTime) || Date.now(),
|
||||||
|
|
||||||
isSame(code) {
|
|
||||||
return code === updater.SAME_MD5 || code === updater.SAME_CODE || code === updater.SAME_VERSION;
|
|
||||||
},
|
|
||||||
|
|
||||||
isEdited(code) {
|
|
||||||
return code === updater.EDITED || code === updater.MAYBE_EDITED;
|
|
||||||
},
|
|
||||||
|
|
||||||
checkAllStyles({observer = () => {}, save = true, ignoreDigest} = {}) {
|
checkAllStyles({observer = () => {}, save = true, ignoreDigest} = {}) {
|
||||||
updater.resetInterval();
|
updater.resetInterval();
|
||||||
updater.checkAllStyles.running = true;
|
updater.checkAllStyles.running = true;
|
||||||
|
|
|
@ -114,8 +114,12 @@ function reportUpdateState(state, style, details) {
|
||||||
if (entry.classList.contains('can-update')) {
|
if (entry.classList.contains('can-update')) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const same = BG.updater.isSame(details);
|
const same = (
|
||||||
const edited = BG.updater.isEdited(details);
|
details === BG.updater.SAME_MD5 ||
|
||||||
|
details === BG.updater.SAME_CODE ||
|
||||||
|
details === BG.updater.SAME_VERSION
|
||||||
|
);
|
||||||
|
const edited = details === BG.updater.EDITED || details === BG.updater.MAYBE_EDITED;
|
||||||
entry.dataset.details = details;
|
entry.dataset.details = details;
|
||||||
if (!details) {
|
if (!details) {
|
||||||
details = t('updateCheckFailServerUnreachable');
|
details = t('updateCheckFailServerUnreachable');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user