Bugfix: Notification enum conflicts with window.Notification

This commit is contained in:
the-djmaze 2023-02-20 15:59:37 +01:00
parent b5ab175953
commit 8d52b0afdf
13 changed files with 47 additions and 46 deletions

View file

@ -2,6 +2,7 @@ import ko from 'ko';
import { SettingsGet } from 'Common/Globals';
import { koComputable, addObservablesTo, koArrayWithDestroy } from 'External/ko';
import Remote from 'Remote/User/Fetch';
import { Notifications } from 'Common/Enums';
export const ContactUserStore = koArrayWithDestroy();
@ -43,7 +44,7 @@ ContactUserStore.sync = fResultFunc => {
} catch (e) {
ContactUserStore.syncing(false);
console.error(e);
fResultFunc?.(Notification.UnknownError);
fResultFunc?.(Notifications.UnknownError);
}
}, 'ContactsSync');
}

View file

@ -1,7 +1,7 @@
import { koComputable, addObservablesTo, addComputablesTo } from 'External/ko';
import { SMAudio } from 'Common/Audio';
import { Notification } from 'Common/Enums';
import { Notifications } from 'Common/Enums';
import { MessageSetAction } from 'Common/EnumsUser';
import { $htmlCL } from 'Common/Globals';
import { arrayLength, pInt, pString } from 'Common/Utils';
@ -198,7 +198,7 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
let error = '';
if (iError) {
error = getNotification(iError);
if (Notification.RequestAborted !== iError) {
if (Notifications.RequestAborted !== iError) {
MessagelistUserStore([]);
}
} else {
@ -281,7 +281,7 @@ MessagelistUserStore.reload = (bDropPagePosition = false, bDropCurrentFolderCach
} else {
MessagelistUserStore.count(0);
MessagelistUserStore([]);
error = getNotification(Notification.CantGetMessageList);
error = getNotification(Notifications.CantGetMessageList);
}
MessagelistUserStore.error(error);
}