mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52: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);
|
||||
mSortAscending.put(mSortType, sortAscending);
|
||||
|
||||
String notificationHideSubject = sprefs.getString("notificationHideSubject",
|
||||
NotificationHideSubject.NEVER.toString());
|
||||
String notificationHideSubject = sprefs.getString("notificationHideSubject", null);
|
||||
if (notificationHideSubject == null) {
|
||||
// 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);
|
||||
mAttachmentDefaultPath = sprefs.getString("attachmentdefaultpath", Environment.getExternalStorageDirectory().toString());
|
||||
|
Loading…
Reference in New Issue
Block a user