mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Code cleanups #1034
This commit is contained in:
parent
e0daae115e
commit
ad3bcb6cb2
@ -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 () {
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user