use cached pinned usage data
This commit is contained in:
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…
x
Reference in New Issue
Block a user