Code cleanups #1034

This commit is contained in:
Wolfgang Ginolas 2023-05-30 14:38:55 +02:00
parent e0daae115e
commit ad3bcb6cb2
2 changed files with 4 additions and 8 deletions

View File

@ -642,8 +642,7 @@ define([
sframeChan.query('Q_INTEGRATION_HAS_UNSAVED_CHANGES', unsavedChanges, cb);
};
var inte = common.createIntegration(onLocal, cpNfInner.chainpad,
integrationSave, integrationHasUnsavedChanges,
toolbar);
integrationSave, integrationHasUnsavedChanges);
if (inte) {
integration = true;
evIntegrationSave.reg(function () {

View File

@ -8,8 +8,7 @@ define([
onLocal,
chainpad,
saveHandler,
unsavedChangesHandler,
toolbar) {
unsavedChangesHandler) {
var exp = {};
var metadataMgr = Common.getMetadataMgr();
@ -28,8 +27,6 @@ define([
//debug = function () {};
var execCommand = function () {}; // placeholder
toolbar = toolbar; // XXX Use custom "spinner" in toolbar to show what's saved in Nextcloud
var state = {
changed: false,
last: +new Date(),
@ -48,12 +45,12 @@ define([
var SAVE_TO = Math.min((BASE_TIMER / 2), 10000);
const setStateChanged = function(newValue) {
if (state.changed == newValue) {
if (state.changed === newValue) {
return;
}
state.changed = newValue;
unsavedChangesHandler(state.changed, function() {});
}
};
var requestSave = function () {}; // placeholder
var saved = function () {}; // placeholder;
var save = function (id) {