Fixed setting exportedDataText on Main dispatcher
This commit is contained in:
parent
9209347d86
commit
3cff13949e
|
@ -14,6 +14,7 @@ import androidx.compose.ui.text.AnnotatedString
|
||||||
import androidx.compose.ui.text.font.FontFamily
|
import androidx.compose.ui.text.font.FontFamily
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
import net.codinux.banking.dataaccess.entities.AccountTransactionEntity
|
import net.codinux.banking.dataaccess.entities.AccountTransactionEntity
|
||||||
import net.codinux.banking.ui.IOorDefault
|
import net.codinux.banking.ui.IOorDefault
|
||||||
import net.codinux.banking.ui.config.Colors
|
import net.codinux.banking.ui.config.Colors
|
||||||
|
@ -35,7 +36,9 @@ fun ExportScreen(onClosed: () -> Unit) {
|
||||||
coroutineScope.launch(Dispatchers.IOorDefault) {
|
coroutineScope.launch(Dispatchers.IOorDefault) {
|
||||||
transactions = DI.bankingService.getAllAccountTransactions() // a only very bit problematic: if in the meantime new transactions are retrieved, then this transactions property doesn't contain the newly retrieved transactions
|
transactions = DI.bankingService.getAllAccountTransactions() // a only very bit problematic: if in the meantime new transactions are retrieved, then this transactions property doesn't contain the newly retrieved transactions
|
||||||
|
|
||||||
exportedDataText = importerExporter.exportTransactionsAsCsv(transactions, ',')
|
withContext(Dispatchers.Main) {
|
||||||
|
exportedDataText = importerExporter.exportTransactionsAsCsv(transactions, ',')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FullscreenViewBase("Umsätze exportieren", onClosed = onClosed) {
|
FullscreenViewBase("Umsätze exportieren", onClosed = onClosed) {
|
||||||
|
|
Loading…
Reference in New Issue