File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed
feature/validator/src/commonMain/kotlin/com/neoutils/neoregex/feature/validator Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,15 @@ class ValidatorViewModel(
115
115
setupTestCasesListener()
116
116
}
117
117
118
+ private fun initialTestCase () {
119
+ if (testCasesRepository.all.isEmpty()) {
120
+ TestCase ().also { emptyTestCase ->
121
+ testCasesRepository.set(emptyTestCase)
122
+ expanded.value = emptyTestCase.uuid
123
+ }
124
+ }
125
+ }
126
+
118
127
private fun setupTestCasesListener () = screenModelScope.launch {
119
128
testCasesRepository.flow.collectLatest { testCases ->
120
129
testCases.forEach { testCase ->
@@ -137,15 +146,6 @@ class ValidatorViewModel(
137
146
}
138
147
}
139
148
140
- private fun initialTestCase () {
141
- if (testCasesRepository.all.isEmpty()) {
142
- TestCase ().also { emptyTestCase ->
143
- testCasesRepository.set(emptyTestCase)
144
- expanded.value = emptyTestCase.uuid
145
- }
146
- }
147
- }
148
-
149
149
private fun setupPatternListener () = screenModelScope.launch {
150
150
testPattern.collectLatest { testPattern ->
151
151
@@ -160,7 +160,7 @@ class ValidatorViewModel(
160
160
testCaseQueue.enqueue(
161
161
testCasesRepository.all.filterNot {
162
162
it.text.isEmpty()
163
- }.reversed()
163
+ }
164
164
)
165
165
}
166
166
}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import com.neoutils.neoregex.core.common.model.Match
22
22
import com.neoutils.neoregex.core.common.model.TestCase
23
23
import com.neoutils.neoregex.feature.validator.model.TestCaseValidation
24
24
import kotlinx.coroutines.Dispatchers
25
+ import kotlinx.coroutines.delay
25
26
import kotlinx.coroutines.withContext
26
27
27
28
class ValidateUseCase {
You can’t perform that action at this time.
0 commit comments