File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
app/src/main/kotlin/com/d4rk/cleaner/ui/home Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,15 @@ class HomeViewModel(application: Application) : AndroidViewModel(application) {
127
127
isAnalyzing.value = true
128
128
showCleaningComposable.value = true
129
129
viewModelScope.launch {
130
- withContext(Dispatchers .IO ) {
130
+ val filteredFiles = withContext(Dispatchers .IO ) {
131
131
fileScanner.startScanning()
132
- withContext(Dispatchers .Main ) {
133
- scannedFiles.value = fileScanner.getFilteredFiles()
134
- isAnalyzing.value = false
135
- hasScanned.value = true
136
- }
132
+ fileScanner.getFilteredFiles()
133
+ }
134
+
135
+ withContext(Dispatchers .Main ) {
136
+ scannedFiles.value = filteredFiles
137
+ isAnalyzing.value = false
138
+ hasScanned.value = true
137
139
}
138
140
}
139
141
}
You can’t perform that action at this time.
0 commit comments