MOBILE-4269 sync: Remove 'Error' from sync warning modals
parent
8cb4b4ec6d
commit
708165c0e8
|
@ -313,7 +313,7 @@ export class AddonCalendarDayPage implements OnInit, OnDestroy {
|
||||||
const result = await AddonCalendarSync.syncEvents();
|
const result = await AddonCalendarSync.syncEvents();
|
||||||
|
|
||||||
if (result.warnings && result.warnings.length) {
|
if (result.warnings && result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.updated) {
|
if (result.updated) {
|
||||||
|
|
|
@ -328,7 +328,7 @@ export class AddonCalendarEventPage implements OnInit, OnDestroy {
|
||||||
try {
|
try {
|
||||||
const result = await AddonCalendarSync.syncEvents();
|
const result = await AddonCalendarSync.syncEvents();
|
||||||
if (result.warnings && result.warnings.length) {
|
if (result.warnings && result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.deleted && result.deleted.indexOf(this.eventId) != -1) {
|
if (result.deleted && result.deleted.indexOf(this.eventId) != -1) {
|
||||||
|
|
|
@ -200,7 +200,7 @@ export class AddonCalendarIndexPage implements OnInit, OnDestroy {
|
||||||
try {
|
try {
|
||||||
const result = await AddonCalendarSync.syncEvents();
|
const result = await AddonCalendarSync.syncEvents();
|
||||||
if (result.warnings && result.warnings.length) {
|
if (result.warnings && result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.updated) {
|
if (result.updated) {
|
||||||
|
|
|
@ -131,7 +131,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
|
||||||
|
|
||||||
// Show first warning if any.
|
// Show first warning if any.
|
||||||
if (data.warnings && data.warnings[0]) {
|
if (data.warnings && data.warnings[0]) {
|
||||||
CoreDomUtils.showErrorModal(data.warnings[0]);
|
CoreDomUtils.showAlert(undefined, data.warnings[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, this.siteId);
|
}, this.siteId);
|
||||||
|
@ -252,7 +252,7 @@ export class AddonMessagesDiscussionPage implements OnInit, OnDestroy, AfterView
|
||||||
try {
|
try {
|
||||||
const syncResult = await AddonMessagesSync.syncDiscussion(this.conversationId, this.userId);
|
const syncResult = await AddonMessagesSync.syncDiscussion(this.conversationId, this.userId);
|
||||||
if (syncResult.warnings && syncResult.warnings[0]) {
|
if (syncResult.warnings && syncResult.warnings[0]) {
|
||||||
CoreDomUtils.showErrorModal(syncResult.warnings[0]);
|
CoreDomUtils.showAlert(undefined, syncResult.warnings[0]);
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// Ignore errors;
|
// Ignore errors;
|
||||||
|
|
|
@ -372,7 +372,7 @@ export class AddonModAssignIndexComponent extends CoreCourseModuleMainActivityCo
|
||||||
|
|
||||||
if (syncEventData.warnings && syncEventData.warnings.length) {
|
if (syncEventData.warnings && syncEventData.warnings.length) {
|
||||||
// Show warnings.
|
// Show warnings.
|
||||||
CoreDomUtils.showErrorModal(syncEventData.warnings[0]);
|
CoreDomUtils.showAlert(undefined, syncEventData.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -611,7 +611,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes
|
||||||
.syncDiscussionReplies(this.discussionId)
|
.syncDiscussionReplies(this.discussionId)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result.warnings && result.warnings.length) {
|
if (result.warnings && result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result && result.updated && this.forumId) {
|
if (result && result.updated && this.forumId) {
|
||||||
|
@ -632,7 +632,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes
|
||||||
.syncRatings(this.cmId, this.discussionId)
|
.syncRatings(this.cmId, this.discussionId)
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
if (result.warnings && result.warnings.length) {
|
if (result.warnings && result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -402,7 +402,7 @@ export class AddonModLessonPlayerPage implements OnInit, OnDestroy, CanLeave {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retake hasn't changed, show the warning and finish the retake in offline.
|
// Retake hasn't changed, show the warning and finish the retake in offline.
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.offline = false;
|
this.offline = false;
|
||||||
|
|
|
@ -809,7 +809,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
||||||
|
|
||||||
if (this.isCurrentView && syncEventData.warnings && syncEventData.warnings.length) {
|
if (this.isCurrentView && syncEventData.warnings && syncEventData.warnings.length) {
|
||||||
// Show warnings.
|
// Show warnings.
|
||||||
CoreDomUtils.showErrorModal(syncEventData.warnings[0]);
|
CoreDomUtils.showAlert(undefined, syncEventData.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if current page was created or discarded.
|
// Check if current page was created or discarded.
|
||||||
|
|
|
@ -290,7 +290,7 @@ export class AddonNotesListPage implements OnInit, OnDestroy {
|
||||||
const message = CoreTextUtils.buildMessage(warnings);
|
const message = CoreTextUtils.buildMessage(warnings);
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
CoreDomUtils.showErrorModal(message);
|
CoreDomUtils.showAlert(undefined, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ export class CoreCommentsViewerPage implements OnInit, OnDestroy {
|
||||||
private showSyncWarnings(warnings: string[]): void {
|
private showSyncWarnings(warnings: string[]): void {
|
||||||
const message = CoreTextUtils.buildMessage(warnings);
|
const message = CoreTextUtils.buildMessage(warnings);
|
||||||
if (message) {
|
if (message) {
|
||||||
CoreDomUtils.showErrorModal(message);
|
CoreDomUtils.showAlert(undefined, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,7 @@ export class CoreCourseModuleMainActivityComponent extends CoreCourseModuleMainR
|
||||||
const result = await this.sync();
|
const result = await this.sync();
|
||||||
|
|
||||||
if (result.warnings.length) {
|
if (result.warnings.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.hasSyncSucceed(result);
|
return this.hasSyncSucceed(result);
|
||||||
|
|
|
@ -152,7 +152,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon
|
||||||
this.showLoadingAndRefresh(false, false);
|
this.showLoadingAndRefresh(false, false);
|
||||||
|
|
||||||
if (data.warnings && data.warnings[0]) {
|
if (data.warnings && data.warnings[0]) {
|
||||||
CoreDomUtils.showErrorModal(data.warnings[0]);
|
CoreDomUtils.showAlert(undefined, data.warnings[0].message);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ export class CoreCourseContentsPage implements OnInit, OnDestroy, CoreRefreshCon
|
||||||
this.course.displayname || this.course.fullname,
|
this.course.displayname || this.course.fullname,
|
||||||
));
|
));
|
||||||
if (result?.warnings?.length) {
|
if (result?.warnings?.length) {
|
||||||
CoreDomUtils.showErrorModal(result.warnings[0]);
|
CoreDomUtils.showAlert(undefined, result.warnings[0].message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue