mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Refactor app settings.
This commit is contained in:
committed by
Greyson Parrelli
parent
a94d77d81e
commit
f2d5ea0391
@@ -7,8 +7,8 @@ import android.os.Build;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.util.ServiceUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
@@ -23,12 +23,12 @@ final class LogSectionNotifications implements LogSection {
|
||||
public @NonNull CharSequence getContent(@NonNull Context context) {
|
||||
StringBuilder output = new StringBuilder();
|
||||
|
||||
output.append("Message notifications: ").append(TextSecurePreferences.isNotificationsEnabled(context)).append("\n")
|
||||
.append("Call notifications : ").append(TextSecurePreferences.isCallNotificationsEnabled(context)).append("\n")
|
||||
.append("New contact alerts : ").append(TextSecurePreferences.isNewContactsNotificationEnabled(context)).append("\n")
|
||||
.append("In-chat sounds : ").append(TextSecurePreferences.isInThreadNotifications(context)).append("\n")
|
||||
.append("Repeat alerts : ").append(TextSecurePreferences.getRepeatAlertsCount(context)).append("\n")
|
||||
.append("Notification display : ").append(TextSecurePreferences.getNotificationPrivacy(context)).append("\n\n");
|
||||
output.append("Message notifications: ").append(SignalStore.settings().isMessageNotificationsEnabled()).append("\n")
|
||||
.append("Call notifications : ").append(SignalStore.settings().isCallNotificationsEnabled()).append("\n")
|
||||
.append("New contact alerts : ").append(SignalStore.settings().isNotifyWhenContactJoinsSignal()).append("\n")
|
||||
.append("In-chat sounds : ").append(SignalStore.settings().isMessageNotificationsInChatSoundsEnabled()).append("\n")
|
||||
.append("Repeat alerts : ").append(SignalStore.settings().getMessageNotificationsRepeatAlerts()).append("\n")
|
||||
.append("Notification display : ").append(SignalStore.settings().getMessageNotificationsPrivacy()).append("\n\n");
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
NotificationManager manager = ServiceUtil.getNotificationManager(context);
|
||||
|
||||
Reference in New Issue
Block a user