MOBILE-3631 notifications: Use fallback on mark as read notifications

main
Pau Ferrer Ocaña 2021-01-21 14:16:28 +01:00
parent f9b6a66e75
commit e2ac9c6e75
1 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ import { CoreWSExternalWarning } from '@services/ws';
import { CoreTextUtils } from '@services/utils/text';
import { CoreTimeUtils } from '@services/utils/time';
import { CoreUser } from '@features/user/services/user';
// @todo import { AddonMessages, AddonMessagesMarkMessageReadResult } from '@addon/messages/services/messages';
import { AddonMessages, AddonMessagesMarkMessageReadResult } from '@addons/messages/services/messages';
import { CoreSite, CoreSiteWSPreSets } from '@classes/site';
import { CoreLogger } from '@singletons/logger';
import { makeSingleton } from '@singletons';
@ -350,7 +350,7 @@ export class AddonNotificationsProvider {
async markNotificationRead(
notificationId: number,
siteId?: string,
): Promise<CoreMessageMarkNotificationReadWSResponse | undefined> { // @todo | AddonMessagesMarkMessageReadResult
): Promise<CoreMessageMarkNotificationReadWSResponse | AddonMessagesMarkMessageReadResult> {
const site = await CoreSites.instance.getSite(siteId);
@ -363,7 +363,7 @@ export class AddonNotificationsProvider {
return site.write<CoreMessageMarkNotificationReadWSResponse>('core_message_mark_notification_read', params);
} else {
// Fallback for versions prior to 3.5.
// @todo return AddonMessageProvider.instance.markMessageRead(notificationId, site.id);
return AddonMessages.instance.markMessageRead(notificationId, site.id);
}
}