diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 7b1ec14f21..9d020f32b4 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -11,6 +11,8 @@ Thx - Hardy --> + All plugin settings restored to default state. + All profile settings restored to default state. %1$s/%2$s Sunset at %1$s Sunrise at %1$s diff --git a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java index ea7796f7b8..f87c8a01dc 100644 --- a/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java +++ b/OsmAnd/src/net/osmand/access/AccessibilitySettingsFragment.java @@ -189,6 +189,7 @@ public class AccessibilitySettingsFragment extends BaseSettingsFragment implemen OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class); if (plugin != null) { app.getSettings().resetProfilePreferences(appMode, plugin.getPreferences()); + app.showToastMessage(R.string.plugin_prefs_reset_successful); updateAllSettings(); } } diff --git a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java index d47c018db5..96787cf511 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/MultimediaNotesFragment.java @@ -484,6 +484,7 @@ public class MultimediaNotesFragment extends BaseSettingsFragment implements Cop AudioVideoNotesPlugin plugin = OsmandPlugin.getPlugin(AudioVideoNotesPlugin.class); if (plugin != null) { app.getSettings().resetProfilePreferences(appMode, plugin.getPreferences()); + app.showToastMessage(R.string.plugin_prefs_reset_successful); updateAllSettings(); } } diff --git a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java index eee941987c..8c0a0bfda3 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/MonitoringSettingsFragment.java @@ -299,6 +299,7 @@ public class MonitoringSettingsFragment extends BaseSettingsFragment implements OsmandMonitoringPlugin plugin = OsmandPlugin.getPlugin(OsmandMonitoringPlugin.class); if (plugin != null) { app.getSettings().resetProfilePreferences(appMode, plugin.getPreferences()); + app.showToastMessage(R.string.plugin_prefs_reset_successful); updateAllSettings(); } } diff --git a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java index ddbea118c6..4fc1f6c141 100644 --- a/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/ConfigureProfileFragment.java @@ -165,10 +165,13 @@ public class ConfigureProfileFragment extends BaseSettingsFragment implements Co @Override public void resetAppModePrefs(ApplicationMode appMode) { if (appMode != null) { - app.getSettings().resetPreferencesForProfile(appMode); - ApplicationMode.initModeParams(app, appMode); - updateToolbar(); - updateAllSettings(); + boolean prefsRestored = app.getSettings().resetPreferencesForProfile(appMode); + if (prefsRestored) { + app.showToastMessage(R.string.profile_prefs_reset_successful); + ApplicationMode.initModeParams(app, appMode); + updateToolbar(); + updateAllSettings(); + } } }