diff --git a/src/main/java/eu/siacs/conversations/ui/fragment/settings/BackupSettingsFragment.java b/src/main/java/eu/siacs/conversations/ui/fragment/settings/BackupSettingsFragment.java
index c9724a4f1..1dbba5f0d 100644
--- a/src/main/java/eu/siacs/conversations/ui/fragment/settings/BackupSettingsFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/fragment/settings/BackupSettingsFragment.java
@@ -239,7 +239,7 @@ public class BackupSettingsFragment extends XmppPreferenceFragment {
boolean success;
ObjectInputStream input = null;
try {
- final File file = new File(FileBackend.getBackupDirectory(requireContext()).getAbsolutePath() + "/settings.dat");
+ final File file = new File(FileBackend.getBackupDirectory(requireContext()).getAbsolutePath(),"settings.dat");
input = new ObjectInputStream(new FileInputStream(file));
SharedPreferences.Editor prefEdit = PreferenceManager.getDefaultSharedPreferences(requireSettingsActivity()).edit();
prefEdit.clear();
@@ -309,6 +309,12 @@ public class BackupSettingsFragment extends XmppPreferenceFragment {
ex.printStackTrace();
}
}
+ if (success) {
+ new Thread(() -> runOnUiThread(() -> requireActivity().recreate())).start();
+ ToastCompat.makeText(requireActivity(), R.string.success_export_settings, ToastCompat.LENGTH_SHORT).show();
+ } else {
+ ToastCompat.makeText(requireActivity(), R.string.error_export_settings, ToastCompat.LENGTH_SHORT).show();
+ }
return success;
}
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 405a39f94..932bc0a12 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -1410,4 +1410,6 @@
Use colored user names in group chats
Would you like to delete your avatar? Some clients might continue to display a cached copy of your avatar.
Show to contacts only
+ Settings successfully exported
+ Error while exporting settings
\ No newline at end of file