use cached pinned usage data

pull/1/head
ansuz 8 years ago
parent 08902c0910
commit 47857ec382

@ -626,7 +626,13 @@ define([
}); });
} }
}; };
Cryptpad.isOverPinLimit(todo); var limit = Cryptpad.account.limit;
var usage = Cryptpad.account.usage;
if (typeof(limit) !== 'number' || typeof(usage) !== 'number') {
todo("invalid types");
} else if (Cryptpad.isLoggedIn() && usage >= limit) {
todo(void 0, true);
} else { todo(void 0, false); }
return $limit; return $limit;
}; };

Loading…
Cancel
Save