Prompt user for debug logs with slow notifications.

This commit is contained in:
Clark
2023-08-09 12:18:25 -04:00
committed by Alex Hart
parent b51ec53e33
commit bb83ddfe28
11 changed files with 372 additions and 2 deletions

View File

@@ -18,6 +18,8 @@ public class UiHints extends SignalStoreValues {
private static final String HAS_SEEN_TEXT_FORMATTING_ALERT = "uihints.text_formatting.has_seen_alert";
private static final String HAS_NOT_SEEN_EDIT_MESSAGE_BETA_ALERT = "uihints.edit_message.has_not_seen_beta_alert";
private static final String HAS_SEEN_SAFETY_NUMBER_NUX = "uihints.has_seen_safety_number_nux";
private static final String DECLINED_NOTIFICATION_LOGS_PROMPT = "uihints.declined_notification_logs";
private static final String LAST_NOTIFICATION_LOGS_PROMPT_TIME = "uihints.last_notification_logs_prompt";
UiHints(@NonNull KeyValueStore store) {
super(store);
@@ -118,4 +120,20 @@ public class UiHints extends SignalStoreValues {
public void markHasSeenSafetyNumberUpdateNux() {
putBoolean(HAS_SEEN_SAFETY_NUMBER_NUX, true);
}
public long getLastNotificationLogsPrompt() {
return getLong(LAST_NOTIFICATION_LOGS_PROMPT_TIME, 0);
}
public void setLastNotificationLogsPrompt(long timeMs) {
putLong(LAST_NOTIFICATION_LOGS_PROMPT_TIME, timeMs);
}
public void markDeclinedShareNotificationLogs() {
putBoolean(DECLINED_NOTIFICATION_LOGS_PROMPT, true);
}
public boolean hasDeclinedToShareNotificationLogs() {
return getBoolean(DECLINED_NOTIFICATION_LOGS_PROMPT, false);
}
}