mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-02 14:02:17 -05:00
Upgrade from "keyguardPrivacy" to "notificationHideSubject"
Make sure existing installations aren't reset to the default value when the new setting can't be found.
This commit is contained in:
parent
3e6d161c18
commit
592ed3ef38
@ -639,9 +639,15 @@ public class K9 extends Application {
|
|||||||
boolean sortAscending = sprefs.getBoolean("sortAscending", Account.DEFAULT_SORT_ASCENDING);
|
boolean sortAscending = sprefs.getBoolean("sortAscending", Account.DEFAULT_SORT_ASCENDING);
|
||||||
mSortAscending.put(mSortType, sortAscending);
|
mSortAscending.put(mSortType, sortAscending);
|
||||||
|
|
||||||
String notificationHideSubject = sprefs.getString("notificationHideSubject",
|
String notificationHideSubject = sprefs.getString("notificationHideSubject", null);
|
||||||
NotificationHideSubject.NEVER.toString());
|
if (notificationHideSubject == null) {
|
||||||
sNotificationHideSubject = NotificationHideSubject.valueOf(notificationHideSubject);
|
// If the "notificationHideSubject" setting couldn't be found, the app was probably
|
||||||
|
// updated. Look for the old "keyguardPrivacy" setting and map it to the new enum.
|
||||||
|
sNotificationHideSubject = (sprefs.getBoolean("keyguardPrivacy", false)) ?
|
||||||
|
NotificationHideSubject.WHEN_LOCKED : NotificationHideSubject.NEVER;
|
||||||
|
} else {
|
||||||
|
sNotificationHideSubject = NotificationHideSubject.valueOf(notificationHideSubject);
|
||||||
|
}
|
||||||
|
|
||||||
compactLayouts = sprefs.getBoolean("compactLayouts", false);
|
compactLayouts = sprefs.getBoolean("compactLayouts", false);
|
||||||
mAttachmentDefaultPath = sprefs.getString("attachmentdefaultpath", Environment.getExternalStorageDirectory().toString());
|
mAttachmentDefaultPath = sprefs.getString("attachmentdefaultpath", Environment.getExternalStorageDirectory().toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user