Migrates from Toast Message to a Dialog when Zap fails in the reaction row.
This commit is contained in:
@@ -932,6 +932,12 @@ fun ZapReaction(
|
|||||||
},
|
},
|
||||||
onMultipleChoices = {
|
onMultipleChoices = {
|
||||||
wantsToZap = true
|
wantsToZap = true
|
||||||
|
},
|
||||||
|
onError = {
|
||||||
|
scope.launch {
|
||||||
|
zappingProgress = 0f
|
||||||
|
showErrorMessageDialog = it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
@@ -1020,7 +1026,8 @@ private fun zapClick(
|
|||||||
scope: CoroutineScope,
|
scope: CoroutineScope,
|
||||||
context: Context,
|
context: Context,
|
||||||
onZappingProgress: (Float) -> Unit,
|
onZappingProgress: (Float) -> Unit,
|
||||||
onMultipleChoices: () -> Unit
|
onMultipleChoices: () -> Unit,
|
||||||
|
onError: (String) -> Unit
|
||||||
) {
|
) {
|
||||||
if (accountViewModel.account.zapAmountChoices.isEmpty()) {
|
if (accountViewModel.account.zapAmountChoices.isEmpty()) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
@@ -1049,14 +1056,7 @@ private fun zapClick(
|
|||||||
null,
|
null,
|
||||||
"",
|
"",
|
||||||
context,
|
context,
|
||||||
onError = {
|
onError = onError,
|
||||||
scope.launch {
|
|
||||||
onZappingProgress(0f)
|
|
||||||
Toast
|
|
||||||
.makeText(context, it, Toast.LENGTH_SHORT)
|
|
||||||
.show()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onProgress = {
|
onProgress = {
|
||||||
scope.launch(Dispatchers.Main) {
|
scope.launch(Dispatchers.Main) {
|
||||||
onZappingProgress(it)
|
onZappingProgress(it)
|
||||||
|
|||||||
Reference in New Issue
Block a user