Refactor app settings.

This commit is contained in:
Alex Hart
2021-05-12 13:02:44 -03:00
committed by Greyson Parrelli
parent a94d77d81e
commit f2d5ea0391
179 changed files with 5244 additions and 3894 deletions

View File

@@ -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);