mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-14 03:46:25 -04:00
feat(debug): add a toggle to AND/OR all filters. (#2265)
This commit is contained in:
@@ -31,6 +31,7 @@ import org.junit.runner.RunWith
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.geeksville.mesh.ui.debug.FilterMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class DebugFiltersTest {
|
||||
@@ -67,13 +68,15 @@ class DebugFiltersTest {
|
||||
var customFilterText by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf("") }
|
||||
com.geeksville.mesh.ui.debug.DebugActiveFilters(
|
||||
filterTexts = filterTexts,
|
||||
onFilterTextsChange = { filterTexts = it }
|
||||
onFilterTextsChange = { filterTexts = it },
|
||||
filterMode = FilterMode.OR,
|
||||
onFilterModeChange = {}
|
||||
)
|
||||
com.geeksville.mesh.ui.debug.DebugCustomFilterInput(
|
||||
customFilterText = customFilterText,
|
||||
onCustomFilterTextChange = { customFilterText = it },
|
||||
filterTexts = filterTexts,
|
||||
onFilterTextsChange = { filterTexts = it }
|
||||
onFilterTextsChange = { filterTexts = it },
|
||||
)
|
||||
}
|
||||
// Add a custom filter
|
||||
@@ -92,7 +95,9 @@ class DebugFiltersTest {
|
||||
var filterTexts by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf(listOf("A", "B")) }
|
||||
com.geeksville.mesh.ui.debug.DebugActiveFilters(
|
||||
filterTexts = filterTexts,
|
||||
onFilterTextsChange = { filterTexts = it }
|
||||
onFilterTextsChange = { filterTexts = it },
|
||||
filterMode = FilterMode.OR,
|
||||
onFilterModeChange = {}
|
||||
)
|
||||
}
|
||||
// The active filters label and chips should be visible
|
||||
|
||||
@@ -37,6 +37,8 @@ import org.junit.runner.RunWith
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.geeksville.mesh.ui.debug.FilterMode
|
||||
import com.geeksville.mesh.ui.debug.DebugActiveFilters
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class DebugSearchTest {
|
||||
@@ -137,7 +139,9 @@ class DebugSearchTest {
|
||||
var customFilterText by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf("") }
|
||||
com.geeksville.mesh.ui.debug.DebugActiveFilters(
|
||||
filterTexts = filterTexts,
|
||||
onFilterTextsChange = { filterTexts = it }
|
||||
onFilterTextsChange = { filterTexts = it },
|
||||
filterMode = FilterMode.OR,
|
||||
onFilterModeChange = {}
|
||||
)
|
||||
com.geeksville.mesh.ui.debug.DebugCustomFilterInput(
|
||||
customFilterText = customFilterText,
|
||||
@@ -162,7 +166,9 @@ class DebugSearchTest {
|
||||
var filterTexts by androidx.compose.runtime.remember { androidx.compose.runtime.mutableStateOf(listOf("A", "B")) }
|
||||
com.geeksville.mesh.ui.debug.DebugActiveFilters(
|
||||
filterTexts = filterTexts,
|
||||
onFilterTextsChange = { filterTexts = it }
|
||||
onFilterTextsChange = { filterTexts = it },
|
||||
filterMode = FilterMode.OR,
|
||||
onFilterModeChange = {}
|
||||
)
|
||||
}
|
||||
// The active filters label and chips should be visible
|
||||
|
||||
Reference in New Issue
Block a user