mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
just use defaults for led-pattern, it is no longer supported since andoid8; in-chat sounds are independent from global-notification-switch
This commit is contained in:
@@ -117,18 +117,6 @@
|
||||
<item>none</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_led_blink_pattern_entries">
|
||||
<item>@string/fast</item>
|
||||
<item>@string/normal</item>
|
||||
<item>@string/slow</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_led_blink_pattern_values" translatable="false">
|
||||
<item>300,300</item>
|
||||
<item>500,2000</item>
|
||||
<item>3000,3000</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="default_or_custom_values" translatable="false">
|
||||
<item>default</item>
|
||||
<item>custom</item>
|
||||
|
||||
@@ -35,20 +35,6 @@
|
||||
android:entries="@array/pref_led_color_entries"
|
||||
android:entryValues="@array/pref_led_color_values" />
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_led_blink"
|
||||
android:defaultValue="500,2000"
|
||||
android:title="@string/pref_led_pattern"
|
||||
android:dependency="pref_led_color"
|
||||
android:entries="@array/pref_led_blink_pattern_entries"
|
||||
android:entryValues="@array/pref_led_blink_pattern_values" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_key_inthread_notifications"
|
||||
android:title="@string/pref_in_chat_sounds"
|
||||
android:dependency="pref_key_enable_notifications"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_notification_privacy"
|
||||
android:title="@string/pref_notifications_show"
|
||||
@@ -65,4 +51,9 @@
|
||||
android:entries="@array/pref_notification_priority_entries"
|
||||
android:entryValues="@array/pref_notification_priority_values"/>
|
||||
|
||||
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
|
||||
android:key="pref_key_inthread_notifications"
|
||||
android:title="@string/pref_in_chat_sounds"
|
||||
android:defaultValue="true" />
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -72,6 +72,7 @@ abstract class AbstractNotificationBuilder extends NotificationCompat.Builder {
|
||||
}
|
||||
|
||||
private void setLed() {
|
||||
/*
|
||||
String ledColor = Prefs.getNotificationLedColor(context);
|
||||
String ledBlinkPattern = Prefs.getNotificationLedPattern(context);
|
||||
String ledBlinkPatternCustom = Prefs.getNotificationLedPatternCustom(context);
|
||||
@@ -89,6 +90,7 @@ abstract class AbstractNotificationBuilder extends NotificationCompat.Builder {
|
||||
Integer.parseInt(blinkPatternArray[0]),
|
||||
Integer.parseInt(blinkPatternArray[1]));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void setTicker(@NonNull Recipient recipient, @Nullable CharSequence message) {
|
||||
|
||||
@@ -32,8 +32,6 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
|
||||
|
||||
this.findPreference(Prefs.LED_COLOR_PREF)
|
||||
.setOnPreferenceChangeListener(new ListSummaryListener());
|
||||
this.findPreference(Prefs.LED_BLINK_PREF)
|
||||
.setOnPreferenceChangeListener(new ListSummaryListener());
|
||||
this.findPreference(Prefs.RINGTONE_PREF)
|
||||
.setOnPreferenceChangeListener(new RingtoneSummaryListener());
|
||||
this.findPreference(Prefs.NOTIFICATION_PRIVACY_PREF)
|
||||
@@ -58,7 +56,6 @@ public class NotificationsPreferenceFragment extends ListSummaryPreferenceFragme
|
||||
});
|
||||
|
||||
initializeListSummary((ListPreference) findPreference(Prefs.LED_COLOR_PREF));
|
||||
initializeListSummary((ListPreference) findPreference(Prefs.LED_BLINK_PREF));
|
||||
initializeListSummary((ListPreference) findPreference(Prefs.NOTIFICATION_PRIVACY_PREF));
|
||||
initializeListSummary((ListPreference) findPreference(Prefs.NOTIFICATION_PRIORITY_PREF));
|
||||
|
||||
|
||||
@@ -42,9 +42,7 @@ public class Prefs {
|
||||
private static final String CHAT_VIBRATE = "pref_chat_vibrate_"; // followed by chat-id
|
||||
private static final String NOTIFICATION_PREF = "pref_key_enable_notifications";
|
||||
public static final String LED_COLOR_PREF = "pref_led_color";
|
||||
public static final String LED_BLINK_PREF = "pref_led_blink";
|
||||
private static final String LED_BLINK_PREF_CUSTOM = "pref_led_blink_custom";
|
||||
public static final String CHAT_MUTED_UNTIL = "pref_chat_muted_until_"; // followed by chat-id
|
||||
public static final String CHAT_MUTED_UNTIL = "pref_chat_muted_until_"; // followed by chat-id
|
||||
private static final String CHAT_RINGTONE = "pref_chat_ringtone_"; // followed by chat-id
|
||||
public static final String SCREEN_LOCK_TIMEOUT_INTERVAL_PREF = "pref_timeout_interval";
|
||||
public static final String SCREEN_LOCK_TIMEOUT_PREF = "pref_timeout_passphrase";
|
||||
@@ -269,14 +267,6 @@ public class Prefs {
|
||||
return getStringPreference(context, LED_COLOR_PREF, "blue");
|
||||
}
|
||||
|
||||
public static String getNotificationLedPattern(Context context) {
|
||||
return getStringPreference(context, LED_BLINK_PREF, "500,2000");
|
||||
}
|
||||
|
||||
public static String getNotificationLedPatternCustom(Context context) {
|
||||
return getStringPreference(context, LED_BLINK_PREF_CUSTOM, "500,2000");
|
||||
}
|
||||
|
||||
// mute
|
||||
|
||||
public static void setChatMuteDuration(DcContext context, int chatId, long duration) {
|
||||
|
||||
Reference in New Issue
Block a user