mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Allow back button to remove debug log filter.
This commit is contained in:
committed by
Greyson Parrelli
parent
1edc94d5ad
commit
75df8c0e2a
@@ -275,6 +275,8 @@ public class SubmitDebugLogActivity extends BaseActivity {
|
||||
warningButton.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.signal_background_secondary)));
|
||||
errorButton.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.signal_background_secondary)));
|
||||
uncaughtButton.setBackgroundTintList(ColorStateList.valueOf(ContextCompat.getColor(this, R.color.signal_background_secondary)));
|
||||
|
||||
DebugLogsViewer.onFilterLevel(logWebView, "[]");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -58,8 +58,8 @@ let selectedLevels = []; // Log levels that are selected in checkboxes
|
||||
let markers = []; // IDs of highlighted search markers
|
||||
let matchRanges = []; // Ranges of all search matches
|
||||
let matchCount = 0; // Total number of matches
|
||||
let isCaseSensitive = false;
|
||||
let isFiltered = false;
|
||||
let isCaseSensitive = false;
|
||||
|
||||
// Clear all search markers and match info
|
||||
function clearMarkers() {
|
||||
@@ -162,24 +162,22 @@ function onFilter() {
|
||||
}
|
||||
|
||||
function onFilterClose() {
|
||||
isFiltered = false;
|
||||
clearMarkers();
|
||||
editor.getSelection().clearSelection();
|
||||
if (isFiltered) {
|
||||
isFiltered = false;
|
||||
if (selectedLevels.length === 0) {
|
||||
editor.setValue(logLines, -1);
|
||||
} else {
|
||||
const filtered = logLines
|
||||
.split("\n")
|
||||
.filter((line) => {
|
||||
return selectedLevels.some((level) => line.includes(level));
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
if (selectedLevels.length === 0) {
|
||||
editor.setValue(logLines, -1);
|
||||
} else {
|
||||
const filtered = logLines
|
||||
.split("\n")
|
||||
.filter((line) => {
|
||||
return selectedLevels.some((level) => line.includes(level));
|
||||
})
|
||||
.join("\n");
|
||||
|
||||
editor.setValue(filtered, -1);
|
||||
editor.setValue(filtered, -1);
|
||||
}
|
||||
highlightAllMatches(input);
|
||||
}
|
||||
|
||||
highlightAllMatches(input);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user