Changed: StorageResultType to error result code

This commit is contained in:
djmaze 2021-03-16 09:46:23 +01:00
parent be3ef15f8e
commit 4a8d516123
33 changed files with 257 additions and 302 deletions

View file

@ -1,7 +1,6 @@
import ko from 'ko';
import {
StorageResultType,
Notification
} from 'Common/Enums';
@ -151,8 +150,8 @@ class LoginUserView extends AbstractViewCenter {
const fLoginRequest = (sLoginPassword) => {
Remote.login(
(sResult, oData) => {
if (StorageResultType.Success === sResult && oData && 'Login' === oData.Action) {
(iError, oData) => {
if (!iError && oData && 'Login' === oData.Action) {
if (oData.Result) {
if (oData.TwoFactorAuth) {
this.additionalCode('');

View file

@ -2,8 +2,7 @@ import ko from 'ko';
import {
Capa,
KeyState,
StorageResultType
KeyState
} from 'Common/Enums';
import {
@ -853,8 +852,8 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
addRequestedMessage(message.folder, message.uid);
Remote.message(
(result, data) => {
const next = !!(StorageResultType.Success === result && data && data.Result);
(iError, data) => {
const next = !!(!iError && data && data.Result);
setTimeout(() => {
this.bPrefetch = false;
next && this.prefetchNextTick();