mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 17:48:39 +00:00
closes #367 - add option to disable audible inthread notifications
This commit is contained in:
@@ -58,6 +58,7 @@ public class ApplicationPreferencesActivity extends PassphraseRequiredSherlockPr
|
||||
private static final int ENABLE_PASSPHRASE_ACTIVITY = 2;
|
||||
|
||||
public static final String RINGTONE_PREF = "pref_key_ringtone";
|
||||
public static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
public static final String VIBRATE_PREF = "pref_key_vibrate";
|
||||
public static final String NOTIFICATION_PREF = "pref_key_enable_notifications";
|
||||
public static final String LED_COLOR_PREF = "pref_led_color";
|
||||
|
@@ -228,6 +228,11 @@ public class MessageNotifier {
|
||||
private static void sendInThreadNotification(Context context) {
|
||||
try {
|
||||
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
|
||||
if (!sp.getBoolean(ApplicationPreferencesActivity.IN_THREAD_NOTIFICATION_PREF, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
String ringtone = sp.getString(ApplicationPreferencesActivity.RINGTONE_PREF, null);
|
||||
|
||||
if (ringtone == null)
|
||||
|
Reference in New Issue
Block a user