mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Change handling of (token) errors due to #1706
This commit is contained in:
parent
02ea6c4359
commit
d00c953c88
25 changed files with 80 additions and 69 deletions
|
|
@ -27,7 +27,7 @@ import {
|
|||
getFolderFromCacheList
|
||||
} from 'Common/Cache';
|
||||
|
||||
import { i18n, reloadTime } from 'Common/Translator';
|
||||
import { i18n, reloadTime, getErrorMessage } from 'Common/Translator';
|
||||
|
||||
import { SettingsUserStore } from 'Stores/User/Settings';
|
||||
import { NotificationUserStore } from 'Stores/User/Notification';
|
||||
|
|
@ -150,7 +150,8 @@ export class AppUser extends AbstractApp {
|
|||
|
||||
logout() {
|
||||
Remote.request('Logout', (iError, data) =>
|
||||
iError ? alert(data) : rl.logoutReload(Settings.app('customLogoutLink'))
|
||||
iError ? alert('Logout error: ' + getErrorMessage(iError, data))
|
||||
: rl.logoutReload(Settings.app('customLogoutLink'))
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -183,9 +184,9 @@ export class AppUser extends AbstractApp {
|
|||
SettingsUserStore.init();
|
||||
ContactUserStore.init();
|
||||
|
||||
loadFolders(value => {
|
||||
loadFolders((success, error) => {
|
||||
try {
|
||||
if (value) {
|
||||
if (success) {
|
||||
startScreens([
|
||||
MailBoxUserScreen,
|
||||
SettingsUserScreen
|
||||
|
|
@ -227,6 +228,7 @@ export class AppUser extends AbstractApp {
|
|||
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
||||
} else {
|
||||
this.logout();
|
||||
alert('Folders error: ' + getErrorMessage(0, error))
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue