From 4c32d444abba21c0616e189556bc95ddd74d4cc6 Mon Sep 17 00:00:00 2001 From: prajwal27 Date: Thu, 5 Mar 2020 13:48:08 +0530 Subject: [PATCH] fix: Show message when file is not selected while editing Customer image --- .../EditCustomerProfileBottomSheet.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java index 77ee5c9c..8336f95b 100644 --- a/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java +++ b/app/src/main/java/org/apache/fineract/ui/online/customers/customerprofile/editcustomerprofilebottomsheet/EditCustomerProfileBottomSheet.java @@ -286,7 +286,11 @@ void onCancel() { @OnClick(R.id.btn_upload_photo) void uploadPhoto() { if (editAction == EditAction.CAMERA || editAction == EditAction.GALLERY) { - editCustomerProfilePresenter.uploadCustomerPortrait(customerIdentifier, file); + if (file != null) { + editCustomerProfilePresenter.uploadCustomerPortrait(customerIdentifier, file); + } else { + Toaster.show(rootView, getString(R.string.no_file_selected_yet)); + } } else if (editAction == EditAction.DELETE) { editCustomerProfilePresenter.deleteCustomerPortrait(customerIdentifier); }