Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbf2a75e authored by Philipp Heckel's avatar Philipp Heckel
Browse files

Refresh pref screen after settings import, #183

parent 1a9e271d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -439,9 +439,15 @@ class SettingsActivity : AppCompatActivity(), PreferenceFragmentCompat.OnPrefere
                }
                lifecycleScope.launch(Dispatchers.IO) {
                    try {
                        val currentDarkMode = repository.getDarkMode()
                        backuper.restore(uri)
                        requireActivity().runOnUiThread {
                            Toast.makeText(context, getString(R.string.settings_backup_restore_restore_successful), Toast.LENGTH_LONG).show()
                            requireActivity().recreate()
                            val newDarkMode = repository.getDarkMode()
                            if (newDarkMode != currentDarkMode) {
                                AppCompatDelegate.setDefaultNightMode(newDarkMode)
                            }
                        }
                    } catch (e: Exception) {
                        Log.w(TAG, "Restore failed", e)
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ Features:
Bugs:
* IllegalStateException: Failed to build unique file (#177, thanks to @Fallenbagel for reporting)
* SQLiteConstraintException: Crash during UP registration (#185)
* Refresh preferences screen after settings import (#183, thanks to @cmeis for reporting)

Thanks:
* Many thanks to @cmeis, @Fallenbagel, @J117 and @rogeliodh for input on the new attachment logic, and for