mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-08 20:28:34 -05:00
Change naming/wording
This commit is contained in:
parent
07c12e83d0
commit
7959033f26
@ -237,7 +237,7 @@ public class K9 extends Application {
|
|||||||
private static boolean mHideSpecialAccounts = false;
|
private static boolean mHideSpecialAccounts = false;
|
||||||
private static boolean mAutofitWidth;
|
private static boolean mAutofitWidth;
|
||||||
private static boolean mQuietTimeEnabled = false;
|
private static boolean mQuietTimeEnabled = false;
|
||||||
private static boolean mQuietTimeNotificationEnabled = false;
|
private static boolean mNotificationDuringQuietTimeEnabled = true;
|
||||||
private static String mQuietTimeStarts = null;
|
private static String mQuietTimeStarts = null;
|
||||||
private static String mQuietTimeEnds = null;
|
private static String mQuietTimeEnds = null;
|
||||||
private static String mAttachmentDefaultPath = "";
|
private static String mAttachmentDefaultPath = "";
|
||||||
@ -475,7 +475,7 @@ public class K9 extends Application {
|
|||||||
editor.putBoolean("useVolumeKeysForListNavigation", mUseVolumeKeysForListNavigation);
|
editor.putBoolean("useVolumeKeysForListNavigation", mUseVolumeKeysForListNavigation);
|
||||||
editor.putBoolean("autofitWidth", mAutofitWidth);
|
editor.putBoolean("autofitWidth", mAutofitWidth);
|
||||||
editor.putBoolean("quietTimeEnabled", mQuietTimeEnabled);
|
editor.putBoolean("quietTimeEnabled", mQuietTimeEnabled);
|
||||||
editor.putBoolean("quietTimeNotificationEnabled", mQuietTimeNotificationEnabled);
|
editor.putBoolean("notificationDuringQuietTimeEnabled", mNotificationDuringQuietTimeEnabled);
|
||||||
editor.putString("quietTimeStarts", mQuietTimeStarts);
|
editor.putString("quietTimeStarts", mQuietTimeStarts);
|
||||||
editor.putString("quietTimeEnds", mQuietTimeEnds);
|
editor.putString("quietTimeEnds", mQuietTimeEnds);
|
||||||
|
|
||||||
@ -710,7 +710,7 @@ public class K9 extends Application {
|
|||||||
mAutofitWidth = sprefs.getBoolean("autofitWidth", true);
|
mAutofitWidth = sprefs.getBoolean("autofitWidth", true);
|
||||||
|
|
||||||
mQuietTimeEnabled = sprefs.getBoolean("quietTimeEnabled", false);
|
mQuietTimeEnabled = sprefs.getBoolean("quietTimeEnabled", false);
|
||||||
mQuietTimeNotificationEnabled = sprefs.getBoolean("quietTimeNotificationEnabled", false);
|
mNotificationDuringQuietTimeEnabled = sprefs.getBoolean("notificationDuringQuietTimeEnabled", true);
|
||||||
mQuietTimeStarts = sprefs.getString("quietTimeStarts", "21:00");
|
mQuietTimeStarts = sprefs.getString("quietTimeStarts", "21:00");
|
||||||
mQuietTimeEnds = sprefs.getString("quietTimeEnds", "7:00");
|
mQuietTimeEnds = sprefs.getString("quietTimeEnds", "7:00");
|
||||||
|
|
||||||
@ -973,12 +973,12 @@ public class K9 extends Application {
|
|||||||
mQuietTimeEnabled = quietTimeEnabled;
|
mQuietTimeEnabled = quietTimeEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean getQuietTimeNotificationEnabled() {
|
public static boolean isNotificationDuringQuietTimeEnabled() {
|
||||||
return mQuietTimeNotificationEnabled;
|
return mNotificationDuringQuietTimeEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setQuietTimeNotificationEnabled(boolean quietTimeNotificationEnabled) {
|
public static void setNotificationDuringQuietTimeEnabled(boolean notificationDuringQuietTimeEnabled) {
|
||||||
mQuietTimeNotificationEnabled = quietTimeNotificationEnabled;
|
mNotificationDuringQuietTimeEnabled = notificationDuringQuietTimeEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getQuietTimeStarts() {
|
public static String getQuietTimeStarts() {
|
||||||
|
@ -79,7 +79,8 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private static final String PREFERENCE_MESSAGEVIEW_RETURN_TO_LIST = "messageview_return_to_list";
|
private static final String PREFERENCE_MESSAGEVIEW_RETURN_TO_LIST = "messageview_return_to_list";
|
||||||
private static final String PREFERENCE_MESSAGEVIEW_SHOW_NEXT = "messageview_show_next";
|
private static final String PREFERENCE_MESSAGEVIEW_SHOW_NEXT = "messageview_show_next";
|
||||||
private static final String PREFERENCE_QUIET_TIME_ENABLED = "quiet_time_enabled";
|
private static final String PREFERENCE_QUIET_TIME_ENABLED = "quiet_time_enabled";
|
||||||
private static final String PREFERENCE_QUIET_TIME_NOTIFICATION_ENABLED = "quiet_time_notification_enabled";
|
private static final String PREFERENCE_DISABLE_NOTIFICATION_DURING_QUIET_TIME =
|
||||||
|
"disable_notifications_during_quiet_time";
|
||||||
private static final String PREFERENCE_QUIET_TIME_STARTS = "quiet_time_starts";
|
private static final String PREFERENCE_QUIET_TIME_STARTS = "quiet_time_starts";
|
||||||
private static final String PREFERENCE_QUIET_TIME_ENDS = "quiet_time_ends";
|
private static final String PREFERENCE_QUIET_TIME_ENDS = "quiet_time_ends";
|
||||||
private static final String PREFERENCE_NOTIF_QUICK_DELETE = "notification_quick_delete";
|
private static final String PREFERENCE_NOTIF_QUICK_DELETE = "notification_quick_delete";
|
||||||
@ -143,7 +144,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private CheckBoxListPreference mVisibleRefileActions;
|
private CheckBoxListPreference mVisibleRefileActions;
|
||||||
|
|
||||||
private CheckBoxPreference mQuietTimeEnabled;
|
private CheckBoxPreference mQuietTimeEnabled;
|
||||||
private CheckBoxPreference mQuietTimeNotificationEnabled;
|
private CheckBoxPreference mDisableNotificationDuringQuietTime;
|
||||||
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeStarts;
|
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeStarts;
|
||||||
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeEnds;
|
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeEnds;
|
||||||
private ListPreference mNotificationQuickDelete;
|
private ListPreference mNotificationQuickDelete;
|
||||||
@ -311,8 +312,9 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
mQuietTimeEnabled = (CheckBoxPreference) findPreference(PREFERENCE_QUIET_TIME_ENABLED);
|
mQuietTimeEnabled = (CheckBoxPreference) findPreference(PREFERENCE_QUIET_TIME_ENABLED);
|
||||||
mQuietTimeEnabled.setChecked(K9.getQuietTimeEnabled());
|
mQuietTimeEnabled.setChecked(K9.getQuietTimeEnabled());
|
||||||
|
|
||||||
mQuietTimeNotificationEnabled = (CheckBoxPreference) findPreference(PREFERENCE_QUIET_TIME_NOTIFICATION_ENABLED);
|
mDisableNotificationDuringQuietTime = (CheckBoxPreference) findPreference(
|
||||||
mQuietTimeNotificationEnabled.setChecked(K9.getQuietTimeNotificationEnabled());
|
PREFERENCE_DISABLE_NOTIFICATION_DURING_QUIET_TIME);
|
||||||
|
mDisableNotificationDuringQuietTime.setChecked(!K9.isNotificationDuringQuietTimeEnabled());
|
||||||
mQuietTimeStarts = (TimePickerPreference) findPreference(PREFERENCE_QUIET_TIME_STARTS);
|
mQuietTimeStarts = (TimePickerPreference) findPreference(PREFERENCE_QUIET_TIME_STARTS);
|
||||||
mQuietTimeStarts.setDefaultValue(K9.getQuietTimeStarts());
|
mQuietTimeStarts.setDefaultValue(K9.getQuietTimeStarts());
|
||||||
mQuietTimeStarts.setSummary(K9.getQuietTimeStarts());
|
mQuietTimeStarts.setSummary(K9.getQuietTimeStarts());
|
||||||
@ -489,7 +491,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
K9.setMessageViewCopyActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_COPY]);
|
K9.setMessageViewCopyActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_COPY]);
|
||||||
K9.setMessageViewSpamActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_SPAM]);
|
K9.setMessageViewSpamActionVisible(enabledRefileActions[VISIBLE_REFILE_ACTIONS_SPAM]);
|
||||||
|
|
||||||
K9.setQuietTimeNotificationEnabled(mQuietTimeNotificationEnabled.isChecked());
|
K9.setNotificationDuringQuietTimeEnabled(!mDisableNotificationDuringQuietTime.isChecked());
|
||||||
K9.setQuietTimeStarts(mQuietTimeStarts.getTime());
|
K9.setQuietTimeStarts(mQuietTimeStarts.getTime());
|
||||||
K9.setQuietTimeEnds(mQuietTimeEnds.getTime());
|
K9.setQuietTimeEnds(mQuietTimeEnds.getTime());
|
||||||
K9.setWrapFolderNames(mWrapFolderNames.isChecked());
|
K9.setWrapFolderNames(mWrapFolderNames.isChecked());
|
||||||
|
@ -4683,10 +4683,8 @@ public class MessagingController implements Runnable {
|
|||||||
/**
|
/**
|
||||||
* Creates a notification of a newly received message.
|
* Creates a notification of a newly received message.
|
||||||
*/
|
*/
|
||||||
private void notifyAccount(Context context, Account account,
|
private void notifyAccount(Context context, Account account, LocalMessage message, int previousUnreadMessageCount) {
|
||||||
LocalMessage message, int previousUnreadMessageCount) {
|
if (K9.isQuietTime() && !K9.isNotificationDuringQuietTimeEnabled()) {
|
||||||
// if it's quiet time and notifications are disabled, then we shouldn't show a notification
|
|
||||||
if (K9.isQuietTime() && K9.getQuietTimeNotificationEnabled()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,8 +353,8 @@ Please submit bug reports, contribute new features and ask questions at
|
|||||||
|
|
||||||
<string name="quiet_time">Quiet Time</string>
|
<string name="quiet_time">Quiet Time</string>
|
||||||
<string name="quiet_time_description">Disable ringing, buzzing and flashing at night</string>
|
<string name="quiet_time_description">Disable ringing, buzzing and flashing at night</string>
|
||||||
<string name="quiet_time_notification">Quiet Time notifications</string>
|
<string name="quiet_time_notification">Disable notifications</string>
|
||||||
<string name="quiet_time_notification_description">Disable notifications during quiet time</string>
|
<string name="quiet_time_notification_description">Completely disable notifications during Quiet Time</string>
|
||||||
<string name="quiet_time_starts">Quiet Time starts</string>
|
<string name="quiet_time_starts">Quiet Time starts</string>
|
||||||
<string name="quiet_time_ends">Quiet Time ends</string>
|
<string name="quiet_time_ends">Quiet Time ends</string>
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@
|
|||||||
android:summary="@string/quiet_time_description"
|
android:summary="@string/quiet_time_description"
|
||||||
/>
|
/>
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="quiet_time_notification_enabled"
|
android:key="disable_notifications_during_quiet_time"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:dependency="quiet_time_enabled"
|
android:dependency="quiet_time_enabled"
|
||||||
android:title="@string/quiet_time_notification"
|
android:title="@string/quiet_time_notification"
|
||||||
|
Loading…
Reference in New Issue
Block a user