public void load(Storage storage) { accountName = storage.getInt(ACCOUNT_NAME, accountName); accountDescription = storage.getInt(ACCOUNT_DESCRIPTION, accountDescription); folderName = storage.getInt(FOLDER_NAME, folderName); folderStatus = storage.getInt(FOLDER_STATUS, folderStatus); messageListSubject = storage.getInt(MESSAGE_LIST_SUBJECT, messageListSubject); messageListSender = storage.getInt(MESSAGE_LIST_SENDER, messageListSender); messageListDate = storage.getInt(MESSAGE_LIST_DATE, messageListDate); messageListPreview = storage.getInt(MESSAGE_LIST_PREVIEW, messageListPreview); messageViewSender = storage.getInt(MESSAGE_VIEW_SENDER, messageViewSender); messageViewTo = storage.getInt(MESSAGE_VIEW_TO, messageViewTo); messageViewCC = storage.getInt(MESSAGE_VIEW_CC, messageViewCC); messageViewBCC = storage.getInt(MESSAGE_VIEW_BCC, messageViewBCC); messageViewAdditionalHeaders = storage.getInt(MESSAGE_VIEW_ADDITIONAL_HEADERS, messageViewAdditionalHeaders); messageViewSubject = storage.getInt(MESSAGE_VIEW_SUBJECT, messageViewSubject); messageViewDate = storage.getInt(MESSAGE_VIEW_DATE, messageViewDate); loadMessageViewContentPercent(storage); messageComposeInput = storage.getInt(MESSAGE_COMPOSE_INPUT, messageComposeInput); }
private void loadMessageViewContentPercent(Storage storage) { int fallbackValue = 100; if (!storage.contains(MESSAGE_VIEW_CONTENT_PERCENT)) { int oldValue = storage.getInt(MESSAGE_VIEW_CONTENT, 3); fallbackValue = GlobalSettings.SettingsUpgraderV31.convertFromOldSize(oldValue); } setMessageViewContentAsPercent(storage.getInt(MESSAGE_VIEW_CONTENT_PERCENT, fallbackValue)); }
messageListCheckboxes = storage.getBoolean("messageListCheckboxes", false); messageListStars = storage.getBoolean("messageListStars", true); messageListPreviewLines = storage.getInt("messageListPreviewLines", 2); showContactPicture = storage.getBoolean("showContactPicture", true); changeContactNameColor = storage.getBoolean("changeRegisteredNameColor", false); contactNameColor = storage.getInt("registeredNameColor", 0xff00008f); messageViewFixedWidthFont = storage.getBoolean("messageViewFixedWidthFont", false); messageViewReturnToList = storage.getBoolean("messageViewReturnToList", false); messageViewSpamActionVisible = storage.getBoolean("messageViewSpamActionVisible", false); pgpInlineDialogCounter = storage.getInt("pgpInlineDialogCounter", 0); pgpSignOnlyDialogCounter = storage.getInt("pgpSignOnlyDialogCounter", 0); int themeValue = storage.getInt("theme", Theme.LIGHT.ordinal()); themeValue = storage.getInt("messageViewTheme", Theme.USE_GLOBAL.ordinal()); K9.setK9MessageViewThemeSetting(Theme.values()[themeValue]); themeValue = storage.getInt("messageComposeTheme", Theme.USE_GLOBAL.ordinal()); K9.setK9ComposerThemeSetting(Theme.values()[themeValue]); K9.setUseFixedMessageViewTheme(storage.getBoolean("fixedMessageViewTheme", true));