mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Cleanup constants
This commit is contained in:
parent
87e214aef7
commit
0a95e2c6dc
11 changed files with 40 additions and 104 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { TOKEN_ERROR_LIMIT, AJAX_ERROR_LIMIT, DEFAULT_AJAX_TIMEOUT } from 'Common/Consts';
|
||||
import { DEFAULT_AJAX_TIMEOUT } from 'Common/Consts';
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { pInt, pString } from 'Common/Utils';
|
||||
import { serverRequest } from 'Common/Links';
|
||||
|
|
@ -36,11 +36,11 @@ checkResponseError = data => {
|
|||
++iTokenErrorCount;
|
||||
}
|
||||
|
||||
if (TOKEN_ERROR_LIMIT < iTokenErrorCount) {
|
||||
if (10 < iTokenErrorCount) {
|
||||
rl.logoutReload();
|
||||
}
|
||||
|
||||
if (window.rl && (data.ClearAuth || data.Logout || AJAX_ERROR_LIMIT < iAjaxErrorCount)) {
|
||||
if (window.rl && (data.ClearAuth || data.Logout || 7 < iAjaxErrorCount)) {
|
||||
rl.hash.clear();
|
||||
|
||||
if (!data.ClearAuth) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue