MOBILE-4551 sync: Display toast when site sync is successful
parent
b38b77edd9
commit
70994ca4f5
|
@ -2493,6 +2493,7 @@
|
||||||
"core.settings.showdownloadoptions": "local_moodlemobileapp",
|
"core.settings.showdownloadoptions": "local_moodlemobileapp",
|
||||||
"core.settings.siteinfo": "local_moodlemobileapp",
|
"core.settings.siteinfo": "local_moodlemobileapp",
|
||||||
"core.settings.sites": "moodle",
|
"core.settings.sites": "moodle",
|
||||||
|
"core.settings.sitesynccompleted": "local_moodlemobileapp",
|
||||||
"core.settings.sitesyncfailed": "local_moodlemobileapp",
|
"core.settings.sitesyncfailed": "local_moodlemobileapp",
|
||||||
"core.settings.spaceusage": "local_moodlemobileapp",
|
"core.settings.spaceusage": "local_moodlemobileapp",
|
||||||
"core.settings.syncdatasaver": "local_moodlemobileapp",
|
"core.settings.syncdatasaver": "local_moodlemobileapp",
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
"showdownloadoptions": "Show download options",
|
"showdownloadoptions": "Show download options",
|
||||||
"siteinfo": "Site info",
|
"siteinfo": "Site info",
|
||||||
"sites": "Sites",
|
"sites": "Sites",
|
||||||
|
"sitesynccompleted": "Site synchronisation completed.",
|
||||||
"sitesyncfailed": "Site synchronisation failed",
|
"sitesyncfailed": "Site synchronisation failed",
|
||||||
"spaceusage": "Space usage",
|
"spaceusage": "Space usage",
|
||||||
"syncdatasaver": "Data saver: Synchronise only when on Wi-Fi",
|
"syncdatasaver": "Data saver: Synchronise only when on Wi-Fi",
|
||||||
|
|
|
@ -116,6 +116,8 @@ export class CoreSitePreferencesPage implements AfterViewInit, OnDestroy {
|
||||||
try {
|
try {
|
||||||
// Using syncOnlyOnWifi false to force manual sync.
|
// Using syncOnlyOnWifi false to force manual sync.
|
||||||
await CoreSettingsHelper.synchronizeSite(false, this.siteId);
|
await CoreSettingsHelper.synchronizeSite(false, this.siteId);
|
||||||
|
|
||||||
|
CoreDomUtils.showToast('core.settings.sitesynccompleted', true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (this.isDestroyed) {
|
if (this.isDestroyed) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -131,6 +131,8 @@ export class CoreSettingsSynchronizationPage implements OnInit, OnDestroy {
|
||||||
// Using syncOnlyOnWifi false to force manual sync.
|
// Using syncOnlyOnWifi false to force manual sync.
|
||||||
try {
|
try {
|
||||||
await CoreSettingsHelper.synchronizeSite(false, siteId);
|
await CoreSettingsHelper.synchronizeSite(false, siteId);
|
||||||
|
|
||||||
|
CoreDomUtils.showToast('core.settings.sitesynccompleted', true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (this.isDestroyed) {
|
if (this.isDestroyed) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue