MOBILE-4551 sync: Display toast when site sync is successful

main
Dani Palou 2024-03-25 12:52:24 +01:00
parent b38b77edd9
commit 70994ca4f5
4 changed files with 6 additions and 0 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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;

View File

@ -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;