1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-02 00:25:10 -04:00

Save settings changes "on pause" rather than "on back" so we actually

save settings when a user hits home or menu or whatever.
This commit is contained in:
Jesse Vincent 2012-01-06 20:27:10 -05:00
parent 3d9f9c4ab4
commit ec78c1e009
3 changed files with 9 additions and 5 deletions

View File

@ -817,9 +817,9 @@ public class AccountSettings extends K9PreferenceActivity {
}
@Override
public void onBackPressed() {
protected void onPause() {
saveSettings();
super.onBackPressed();
super.onPause();
}
private void onCompositionSettings() {

View File

@ -145,13 +145,13 @@ public class FolderSettings extends K9PreferenceActivity {
}
@Override
public void onBackPressed() {
public void onPause() {
try {
saveSettings();
} catch (MessagingException e) {
Log.e(K9.LOG_TAG, "Saving folder settings failed", e);
}
super.onBackPressed();
super.onPause();
}
}

View File

@ -403,9 +403,13 @@ public class Prefs extends K9PreferenceActivity {
}
@Override
public void onBackPressed() {
protected void onPause() {
saveSettings();
super.onPause();
}
@Override
public void onBackPressed() {
if (K9.manageBack()) {
Accounts.listAccounts(this);
finish();