diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt index 94ab5037b..a603689a5 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ZapCustomDialog.kt @@ -105,12 +105,7 @@ class ZapOptionstViewModel : ViewModel() { } fun value(): Long? { - return try { - customAmount.text.trim().toLongOrNull() - } catch (e: Exception) { - if (e is CancellationException) throw e - null - } + return customAmount.text.trim().toLongOrNull() } fun cancel() {} @@ -285,7 +280,7 @@ fun ZapButton( onPost: () -> Unit, ) { Button( - onClick = { onPost() }, + onClick = { if (isActive) onPost() }, shape = ButtonBorder, colors = ButtonDefaults.buttonColors(