mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
Calculating ZapAmount and converting to the screen before exiting the IO thread
This commit is contained in:
parent
b093873eb0
commit
dea35552d5
@ -318,7 +318,7 @@ fun ZapReaction(
|
||||
var zappingProgress by remember { mutableStateOf(0f) }
|
||||
|
||||
var wasZappedByLoggedInUser by remember { mutableStateOf(false) }
|
||||
var zapAmount by remember { mutableStateOf<BigDecimal?>(null) }
|
||||
var zapAmountTxt by remember { mutableStateOf<String>("") }
|
||||
|
||||
LaunchedEffect(key1 = zapsState) {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
@ -326,7 +326,7 @@ fun ZapReaction(
|
||||
wasZappedByLoggedInUser = accountViewModel.calculateIfNoteWasZappedByAccount(zappedNote)
|
||||
}
|
||||
|
||||
zapAmount = account.calculateZappedAmount(zappedNote)
|
||||
zapAmountTxt = showAmount(account.calculateZappedAmount(zappedNote))
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,7 +456,7 @@ fun ZapReaction(
|
||||
}
|
||||
|
||||
Text(
|
||||
showAmount(zapAmount),
|
||||
zapAmountTxt,
|
||||
fontSize = 14.sp,
|
||||
color = grayTint,
|
||||
modifier = textModifier
|
||||
|
Loading…
Reference in New Issue
Block a user