deprioritize successful save notifications

This commit is contained in:
buzz-lightsnack-2007 2024-05-12 19:55:54 +08:00
parent 777191a27c
commit 6ab3368edf

View file

@ -178,9 +178,9 @@ class global {
let DATA_ALL; let DATA_ALL;
// Inform the user that saving is in progress. // Inform the user that saving is in progress.
(((typeof OPTIONS).includes(`obj`) && OPTIONS != null) ? (!(!!OPTIONS[`silent`])) : true) if (((typeof OPTIONS).includes(`obj`) && OPTIONS != null) ? (!(!!OPTIONS[`silent`])) : true) {
? new logging ((new texts(`saving_current`)).localized, (new texts(`saving_current_message`)).localized, false) let LOG = new logging ((new texts(`saving_current`)).localized, (new texts(`saving_current_message`)).localized, false)
: false; };
// Get all data and set a blank value if it doesn't exist yet. // Get all data and set a blank value if it doesn't exist yet.
DATA_ALL = await global.read(null, CLOUD); DATA_ALL = await global.read(null, CLOUD);
@ -203,6 +203,7 @@ class global {
// Write! // Write!
chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED); chrome.storage[(CLOUD > 0) ? `sync` : `local`].set(DATA_INJECTED);
(typeof LOG).includes(`undef`) ? false : LOG.clear();
return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? verify(DATA_NAME, data) : true); return ((OPTIONS[`verify`] != null ? (OPTIONS[`verify`]) : true) ? verify(DATA_NAME, data) : true);
} }