mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Revert "Remove the message list stars preference now that stars are in the chip"
This reverts commit 48785f52bf
.
Conflicts:
src/com/fsck/k9/K9.java
src/com/fsck/k9/activity/Accounts.java
src/com/fsck/k9/activity/FolderList.java
src/com/fsck/k9/activity/MessageList.java
src/com/fsck/k9/activity/setup/Prefs.java
This commit is contained in:
parent
ee234b65f8
commit
0a79df2155
@ -137,6 +137,14 @@
|
||||
android:entryValues="@array/settings_preview_lines_values"
|
||||
android:dialogTitle="@string/global_settings_preview_lines_label"
|
||||
/>
|
||||
|
||||
|
||||
<CheckBoxPreference
|
||||
android:persistent="false"
|
||||
android:key="messagelist_stars"
|
||||
android:title="@string/global_settings_flag_label"
|
||||
android:summary="@string/global_settings_flag_summary" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:persistent="false"
|
||||
android:key="messagelist_checkboxes"
|
||||
|
@ -224,6 +224,7 @@ public class K9 extends Application {
|
||||
}
|
||||
|
||||
private static boolean mMessageListCheckboxes = true;
|
||||
private static boolean mMessageListStars = true;
|
||||
private static int mMessageListPreviewLines = 2;
|
||||
|
||||
private static boolean mShowCorrespondentNames = true;
|
||||
@ -504,6 +505,7 @@ public class K9 extends Application {
|
||||
editor.putBoolean("countSearchMessages", mCountSearchMessages);
|
||||
editor.putBoolean("messageListSenderAboveSubject", mMessageListSenderAboveSubject);
|
||||
editor.putBoolean("hideSpecialAccounts", mHideSpecialAccounts);
|
||||
editor.putBoolean("messageListStars", mMessageListStars);
|
||||
editor.putInt("messageListPreviewLines", mMessageListPreviewLines);
|
||||
editor.putBoolean("messageListCheckboxes", mMessageListCheckboxes);
|
||||
editor.putBoolean("showCorrespondentNames", mShowCorrespondentNames);
|
||||
@ -694,6 +696,7 @@ public class K9 extends Application {
|
||||
mHideSpecialAccounts = sprefs.getBoolean("hideSpecialAccounts", false);
|
||||
mMessageListSenderAboveSubject = sprefs.getBoolean("messageListSenderAboveSubject", false);
|
||||
mMessageListCheckboxes = sprefs.getBoolean("messageListCheckboxes", true);
|
||||
mMessageListStars = sprefs.getBoolean("messageListStars", true);
|
||||
mMessageListPreviewLines = sprefs.getInt("messageListPreviewLines", 2);
|
||||
|
||||
mMobileOptimizedLayout = sprefs.getBoolean("mobileOptimizedLayout", false);
|
||||
@ -1050,7 +1053,6 @@ public class K9 extends Application {
|
||||
mMessageListPreviewLines = lines;
|
||||
}
|
||||
|
||||
|
||||
public static boolean messageListCheckboxes() {
|
||||
return mMessageListCheckboxes;
|
||||
}
|
||||
@ -1059,6 +1061,14 @@ public class K9 extends Application {
|
||||
mMessageListCheckboxes = checkboxes;
|
||||
}
|
||||
|
||||
public static boolean messageListStars() {
|
||||
return mMessageListStars;
|
||||
}
|
||||
|
||||
public static void setMessageListStars(boolean stars) {
|
||||
mMessageListStars = stars;
|
||||
}
|
||||
|
||||
public static boolean showCorrespondentNames() {
|
||||
return mShowCorrespondentNames;
|
||||
}
|
||||
|
@ -1749,7 +1749,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
holder.newMessageCountWrapper.setVisibility(unreadMessageCount > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
holder.flaggedMessageCount.setText(Integer.toString(stats.flaggedMessageCount));
|
||||
holder.flaggedMessageCountWrapper.setVisibility(stats.flaggedMessageCount > 0 ? View.VISIBLE : View.GONE);
|
||||
holder.flaggedMessageCountWrapper.setVisibility(K9.messageListStars() && stats.flaggedMessageCount > 0 ? View.VISIBLE : View.GONE);
|
||||
|
||||
holder.flaggedMessageCountWrapper.setOnClickListener(createFlaggedSearchListener(account));
|
||||
holder.newMessageCountWrapper.setOnClickListener(createUnreadSearchListener(account));
|
||||
|
@ -1042,7 +1042,7 @@ public class FolderList extends K9ListActivity {
|
||||
holder.newMessageCountWrapper.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (folder.flaggedMessageCount > 0) {
|
||||
if (K9.messageListStars() && folder.flaggedMessageCount > 0) {
|
||||
holder.flaggedMessageCount.setText(Integer.toString(folder.flaggedMessageCount));
|
||||
holder.flaggedMessageCountWrapper.setOnClickListener(
|
||||
createFlaggedSearch(mAccount, folder));
|
||||
|
@ -163,6 +163,8 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
||||
private LocalSearch mSearch;
|
||||
private boolean mSingleFolderMode;
|
||||
private boolean mSingleAccountMode;
|
||||
private boolean mStars = true;
|
||||
|
||||
private ProgressBar mActionBarProgress;
|
||||
private MenuItem mMenuButtonCheckMail;
|
||||
private View mActionButtonIndeterminateProgress;
|
||||
@ -488,6 +490,7 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
mStars = K9.messageListStars();
|
||||
|
||||
if (!(this instanceof Search)) {
|
||||
//necessary b/c no guarantee Search.onStop will be called before MessageList.onResume
|
||||
|
@ -68,6 +68,7 @@ public class Prefs extends K9PreferenceActivity {
|
||||
private static final String PREFERENCE_MESSAGELIST_CHECKBOXES = "messagelist_checkboxes";
|
||||
private static final String PREFERENCE_MESSAGELIST_PREVIEW_LINES = "messagelist_preview_lines";
|
||||
private static final String PREFERENCE_MESSAGELIST_SENDER_ABOVE_SUBJECT = "messagelist_sender_above_subject";
|
||||
private static final String PREFERENCE_MESSAGELIST_STARS = "messagelist_stars";
|
||||
private static final String PREFERENCE_MESSAGELIST_SHOW_CORRESPONDENT_NAMES = "messagelist_show_correspondent_names";
|
||||
private static final String PREFERENCE_MESSAGELIST_SHOW_CONTACT_NAME = "messagelist_show_contact_name";
|
||||
private static final String PREFERENCE_MESSAGELIST_CONTACT_NAME_COLOR = "messagelist_contact_name_color";
|
||||
@ -116,6 +117,7 @@ public class Prefs extends K9PreferenceActivity {
|
||||
private ListPreference mPreviewLines;
|
||||
private CheckBoxPreference mSenderAboveSubject;
|
||||
private CheckBoxPreference mCheckboxes;
|
||||
private CheckBoxPreference mStars;
|
||||
private CheckBoxPreference mShowCorrespondentNames;
|
||||
private CheckBoxPreference mShowContactName;
|
||||
private CheckBoxPreference mChangeContactNameColor;
|
||||
@ -240,6 +242,8 @@ public class Prefs extends K9PreferenceActivity {
|
||||
mCheckboxes = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_CHECKBOXES);
|
||||
mCheckboxes.setChecked(K9.messageListCheckboxes());
|
||||
|
||||
mStars = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_STARS);
|
||||
mStars.setChecked(K9.messageListStars());
|
||||
|
||||
mShowCorrespondentNames = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_SHOW_CORRESPONDENT_NAMES);
|
||||
mShowCorrespondentNames.setChecked(K9.showCorrespondentNames());
|
||||
@ -459,6 +463,7 @@ public class Prefs extends K9PreferenceActivity {
|
||||
K9.setHideSpecialAccounts(mHideSpecialAccounts.isChecked());
|
||||
K9.setMessageListPreviewLines(Integer.parseInt(mPreviewLines.getValue()));
|
||||
K9.setMessageListCheckboxes(mCheckboxes.isChecked());
|
||||
K9.setMessageListStars(mStars.isChecked());
|
||||
K9.setShowCorrespondentNames(mShowCorrespondentNames.isChecked());
|
||||
K9.setMessageListSenderAboveSubject(mSenderAboveSubject.isChecked());
|
||||
K9.setShowContactName(mShowContactName.isChecked());
|
||||
|
@ -142,6 +142,9 @@ public class GlobalSettings {
|
||||
s.put("messageListPreviewLines", Settings.versions(
|
||||
new V(1, new IntegerRangeSetting(1, 100, 2))
|
||||
));
|
||||
s.put("messageListStars", Settings.versions(
|
||||
new V(1, new BooleanSetting(true))
|
||||
));
|
||||
s.put("messageViewFixedWidthFont", Settings.versions(
|
||||
new V(1, new BooleanSetting(false))
|
||||
));
|
||||
|
Loading…
Reference in New Issue
Block a user