From 80b5f9f571a1f9548cdfcc3d6de1ec501634eada Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Fri, 21 Dec 2018 18:24:39 -0600 Subject: [PATCH] Avoid sharing the QR code image if the fields are not filled correctly --- .../fragments/ReceiveTransactionFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/ReceiveTransactionFragment.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/ReceiveTransactionFragment.kt index b5b0758..09300bc 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/ReceiveTransactionFragment.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/fragments/ReceiveTransactionFragment.kt @@ -382,6 +382,11 @@ class ReceiveTransactionFragment : Fragment(), ServiceConnection { * sends an intent so the user can select the desired method to share the image. */ private fun shareQRScreenshot() { + // TODO improve, show errors where necessary so the user can fix it + // Avoid sharing the QR code image if the fields are not filled correctly + if (mAsset == null) + return + // Get Screenshot val screenshot = Helper.loadBitmapFromView(container) val imageUri = Helper.saveTemporalBitmap(context!!, screenshot)