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:entryValues="@array/settings_preview_lines_values"
|
||||||
android:dialogTitle="@string/global_settings_preview_lines_label"
|
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
|
<CheckBoxPreference
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:key="messagelist_checkboxes"
|
android:key="messagelist_checkboxes"
|
||||||
|
@ -224,6 +224,7 @@ public class K9 extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static boolean mMessageListCheckboxes = true;
|
private static boolean mMessageListCheckboxes = true;
|
||||||
|
private static boolean mMessageListStars = true;
|
||||||
private static int mMessageListPreviewLines = 2;
|
private static int mMessageListPreviewLines = 2;
|
||||||
|
|
||||||
private static boolean mShowCorrespondentNames = true;
|
private static boolean mShowCorrespondentNames = true;
|
||||||
@ -504,6 +505,7 @@ public class K9 extends Application {
|
|||||||
editor.putBoolean("countSearchMessages", mCountSearchMessages);
|
editor.putBoolean("countSearchMessages", mCountSearchMessages);
|
||||||
editor.putBoolean("messageListSenderAboveSubject", mMessageListSenderAboveSubject);
|
editor.putBoolean("messageListSenderAboveSubject", mMessageListSenderAboveSubject);
|
||||||
editor.putBoolean("hideSpecialAccounts", mHideSpecialAccounts);
|
editor.putBoolean("hideSpecialAccounts", mHideSpecialAccounts);
|
||||||
|
editor.putBoolean("messageListStars", mMessageListStars);
|
||||||
editor.putInt("messageListPreviewLines", mMessageListPreviewLines);
|
editor.putInt("messageListPreviewLines", mMessageListPreviewLines);
|
||||||
editor.putBoolean("messageListCheckboxes", mMessageListCheckboxes);
|
editor.putBoolean("messageListCheckboxes", mMessageListCheckboxes);
|
||||||
editor.putBoolean("showCorrespondentNames", mShowCorrespondentNames);
|
editor.putBoolean("showCorrespondentNames", mShowCorrespondentNames);
|
||||||
@ -694,6 +696,7 @@ public class K9 extends Application {
|
|||||||
mHideSpecialAccounts = sprefs.getBoolean("hideSpecialAccounts", false);
|
mHideSpecialAccounts = sprefs.getBoolean("hideSpecialAccounts", false);
|
||||||
mMessageListSenderAboveSubject = sprefs.getBoolean("messageListSenderAboveSubject", false);
|
mMessageListSenderAboveSubject = sprefs.getBoolean("messageListSenderAboveSubject", false);
|
||||||
mMessageListCheckboxes = sprefs.getBoolean("messageListCheckboxes", true);
|
mMessageListCheckboxes = sprefs.getBoolean("messageListCheckboxes", true);
|
||||||
|
mMessageListStars = sprefs.getBoolean("messageListStars", true);
|
||||||
mMessageListPreviewLines = sprefs.getInt("messageListPreviewLines", 2);
|
mMessageListPreviewLines = sprefs.getInt("messageListPreviewLines", 2);
|
||||||
|
|
||||||
mMobileOptimizedLayout = sprefs.getBoolean("mobileOptimizedLayout", false);
|
mMobileOptimizedLayout = sprefs.getBoolean("mobileOptimizedLayout", false);
|
||||||
@ -1050,7 +1053,6 @@ public class K9 extends Application {
|
|||||||
mMessageListPreviewLines = lines;
|
mMessageListPreviewLines = lines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static boolean messageListCheckboxes() {
|
public static boolean messageListCheckboxes() {
|
||||||
return mMessageListCheckboxes;
|
return mMessageListCheckboxes;
|
||||||
}
|
}
|
||||||
@ -1059,6 +1061,14 @@ public class K9 extends Application {
|
|||||||
mMessageListCheckboxes = checkboxes;
|
mMessageListCheckboxes = checkboxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean messageListStars() {
|
||||||
|
return mMessageListStars;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setMessageListStars(boolean stars) {
|
||||||
|
mMessageListStars = stars;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean showCorrespondentNames() {
|
public static boolean showCorrespondentNames() {
|
||||||
return mShowCorrespondentNames;
|
return mShowCorrespondentNames;
|
||||||
}
|
}
|
||||||
|
@ -1749,7 +1749,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||||||
holder.newMessageCountWrapper.setVisibility(unreadMessageCount > 0 ? View.VISIBLE : View.GONE);
|
holder.newMessageCountWrapper.setVisibility(unreadMessageCount > 0 ? View.VISIBLE : View.GONE);
|
||||||
|
|
||||||
holder.flaggedMessageCount.setText(Integer.toString(stats.flaggedMessageCount));
|
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.flaggedMessageCountWrapper.setOnClickListener(createFlaggedSearchListener(account));
|
||||||
holder.newMessageCountWrapper.setOnClickListener(createUnreadSearchListener(account));
|
holder.newMessageCountWrapper.setOnClickListener(createUnreadSearchListener(account));
|
||||||
|
@ -1042,7 +1042,7 @@ public class FolderList extends K9ListActivity {
|
|||||||
holder.newMessageCountWrapper.setVisibility(View.GONE);
|
holder.newMessageCountWrapper.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (folder.flaggedMessageCount > 0) {
|
if (K9.messageListStars() && folder.flaggedMessageCount > 0) {
|
||||||
holder.flaggedMessageCount.setText(Integer.toString(folder.flaggedMessageCount));
|
holder.flaggedMessageCount.setText(Integer.toString(folder.flaggedMessageCount));
|
||||||
holder.flaggedMessageCountWrapper.setOnClickListener(
|
holder.flaggedMessageCountWrapper.setOnClickListener(
|
||||||
createFlaggedSearch(mAccount, folder));
|
createFlaggedSearch(mAccount, folder));
|
||||||
|
@ -163,6 +163,8 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
|||||||
private LocalSearch mSearch;
|
private LocalSearch mSearch;
|
||||||
private boolean mSingleFolderMode;
|
private boolean mSingleFolderMode;
|
||||||
private boolean mSingleAccountMode;
|
private boolean mSingleAccountMode;
|
||||||
|
private boolean mStars = true;
|
||||||
|
|
||||||
private ProgressBar mActionBarProgress;
|
private ProgressBar mActionBarProgress;
|
||||||
private MenuItem mMenuButtonCheckMail;
|
private MenuItem mMenuButtonCheckMail;
|
||||||
private View mActionButtonIndeterminateProgress;
|
private View mActionButtonIndeterminateProgress;
|
||||||
@ -488,6 +490,7 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
|||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
mStars = K9.messageListStars();
|
||||||
|
|
||||||
if (!(this instanceof Search)) {
|
if (!(this instanceof Search)) {
|
||||||
//necessary b/c no guarantee Search.onStop will be called before MessageList.onResume
|
//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_CHECKBOXES = "messagelist_checkboxes";
|
||||||
private static final String PREFERENCE_MESSAGELIST_PREVIEW_LINES = "messagelist_preview_lines";
|
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_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_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_SHOW_CONTACT_NAME = "messagelist_show_contact_name";
|
||||||
private static final String PREFERENCE_MESSAGELIST_CONTACT_NAME_COLOR = "messagelist_contact_name_color";
|
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 ListPreference mPreviewLines;
|
||||||
private CheckBoxPreference mSenderAboveSubject;
|
private CheckBoxPreference mSenderAboveSubject;
|
||||||
private CheckBoxPreference mCheckboxes;
|
private CheckBoxPreference mCheckboxes;
|
||||||
|
private CheckBoxPreference mStars;
|
||||||
private CheckBoxPreference mShowCorrespondentNames;
|
private CheckBoxPreference mShowCorrespondentNames;
|
||||||
private CheckBoxPreference mShowContactName;
|
private CheckBoxPreference mShowContactName;
|
||||||
private CheckBoxPreference mChangeContactNameColor;
|
private CheckBoxPreference mChangeContactNameColor;
|
||||||
@ -240,6 +242,8 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
mCheckboxes = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_CHECKBOXES);
|
mCheckboxes = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_CHECKBOXES);
|
||||||
mCheckboxes.setChecked(K9.messageListCheckboxes());
|
mCheckboxes.setChecked(K9.messageListCheckboxes());
|
||||||
|
|
||||||
|
mStars = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_STARS);
|
||||||
|
mStars.setChecked(K9.messageListStars());
|
||||||
|
|
||||||
mShowCorrespondentNames = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_SHOW_CORRESPONDENT_NAMES);
|
mShowCorrespondentNames = (CheckBoxPreference)findPreference(PREFERENCE_MESSAGELIST_SHOW_CORRESPONDENT_NAMES);
|
||||||
mShowCorrespondentNames.setChecked(K9.showCorrespondentNames());
|
mShowCorrespondentNames.setChecked(K9.showCorrespondentNames());
|
||||||
@ -459,6 +463,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
K9.setHideSpecialAccounts(mHideSpecialAccounts.isChecked());
|
K9.setHideSpecialAccounts(mHideSpecialAccounts.isChecked());
|
||||||
K9.setMessageListPreviewLines(Integer.parseInt(mPreviewLines.getValue()));
|
K9.setMessageListPreviewLines(Integer.parseInt(mPreviewLines.getValue()));
|
||||||
K9.setMessageListCheckboxes(mCheckboxes.isChecked());
|
K9.setMessageListCheckboxes(mCheckboxes.isChecked());
|
||||||
|
K9.setMessageListStars(mStars.isChecked());
|
||||||
K9.setShowCorrespondentNames(mShowCorrespondentNames.isChecked());
|
K9.setShowCorrespondentNames(mShowCorrespondentNames.isChecked());
|
||||||
K9.setMessageListSenderAboveSubject(mSenderAboveSubject.isChecked());
|
K9.setMessageListSenderAboveSubject(mSenderAboveSubject.isChecked());
|
||||||
K9.setShowContactName(mShowContactName.isChecked());
|
K9.setShowContactName(mShowContactName.isChecked());
|
||||||
|
@ -142,6 +142,9 @@ public class GlobalSettings {
|
|||||||
s.put("messageListPreviewLines", Settings.versions(
|
s.put("messageListPreviewLines", Settings.versions(
|
||||||
new V(1, new IntegerRangeSetting(1, 100, 2))
|
new V(1, new IntegerRangeSetting(1, 100, 2))
|
||||||
));
|
));
|
||||||
|
s.put("messageListStars", Settings.versions(
|
||||||
|
new V(1, new BooleanSetting(true))
|
||||||
|
));
|
||||||
s.put("messageViewFixedWidthFont", Settings.versions(
|
s.put("messageViewFixedWidthFont", Settings.versions(
|
||||||
new V(1, new BooleanSetting(false))
|
new V(1, new BooleanSetting(false))
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user