mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fix merge issues
This commit is contained in:
parent
9f68186d07
commit
a84de52566
@ -32,7 +32,7 @@ const factory = function (AppConfig = {}) {
|
||||
MAX_PREMIUM_TEAMS_OWNED: Math.max(AppConfig.maxOwnedTeams || 0, AppConfig.maxPremiumTeamsOwned || 0) || 5,
|
||||
// Apps
|
||||
criticalApps: ['profile', 'settings', 'debug', 'admin', 'support', 'notifications', 'calendar', 'moderation', 'oldadmin'], // XXX oldadmin
|
||||
earlyAccessApps: ['doc', 'presentation']
|
||||
earlyAccessApps: []
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -86,6 +86,12 @@
|
||||
Util.mkEvent = function (once) {
|
||||
var handlers = [];
|
||||
var fired = false;
|
||||
let promiseResolve;
|
||||
|
||||
const promise = new Promise(resolve => {
|
||||
promiseResolve = resolve;
|
||||
});
|
||||
|
||||
return {
|
||||
reg: function (cb) {
|
||||
if (once && fired) { return void setTimeout(cb); }
|
||||
@ -99,10 +105,13 @@
|
||||
},
|
||||
fire: function () {
|
||||
if (once && fired) { return; }
|
||||
fired = true;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
if (!fired) { promiseResolve.apply(null, args); }
|
||||
fired = true;
|
||||
handlers.forEach(function (h) { h.apply(null, args); });
|
||||
}
|
||||
},
|
||||
// Since a promise can only resolve once only the 1st call to fire() is reflected here. Even is `once` is `false`.
|
||||
promise
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -248,7 +248,7 @@ const factory = (Util, Hash,
|
||||
|
||||
var isFolder = exp.isFolder = function (element) {
|
||||
if (isFolderData(element)) { return false; }
|
||||
return typeof(element) === "object" || isSharedFolder(element);
|
||||
return (typeof(element) === "object" && !element.channel) || isSharedFolder(element);
|
||||
};
|
||||
exp.isFolderEmpty = function (element) {
|
||||
if (!isFolder(element)) { return false; }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user