setting to disable notifications for new contacts

also mute these notifications between 23:00 and 09:00

fixes #4572
Closes #4926
This commit is contained in:
agrajaghh
2015-12-19 13:07:44 +01:00
committed by Moxie Marlinspike
parent d238e2bbc5
commit ed592950c0
5 changed files with 33 additions and 3 deletions

View File

@@ -86,6 +86,7 @@ public class TextSecurePreferences {
public static final String REPEAT_ALERTS_PREF = "pref_repeat_alerts";
public static final String NOTIFICATION_PRIVACY_PREF = "pref_notification_privacy";
public static final String NEW_CONTACTS_NOTIFICATIONS = "pref_enable_new_contacts_notifications";
public static final String MEDIA_DOWNLOAD_MOBILE_PREF = "pref_media_download_mobile";
public static final String MEDIA_DOWNLOAD_WIFI_PREF = "pref_media_download_wifi";
@@ -116,6 +117,10 @@ public class TextSecurePreferences {
return new NotificationPrivacyPreference(getStringPreference(context, NOTIFICATION_PRIVACY_PREF, "all"));
}
public static boolean isNewContactsNotificationEnabled(Context context) {
return getBooleanPreference(context, NEW_CONTACTS_NOTIFICATIONS, true);
}
public static long getRatingLaterTimestamp(Context context) {
return getLongPreference(context, RATING_LATER_PREF, 0);
}