Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Fix-287: Photo validation added in EditCustomerProfileBottomSheet #151

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ void onCancel() {
@OnClick(R.id.btn_upload_photo)
void uploadPhoto() {
if (editAction == EditAction.CAMERA || editAction == EditAction.GALLERY) {
if (file == null) {
Toaster.show(rootView, getString(R.string.select_photo));
return;
}
editCustomerProfilePresenter.uploadCustomerPortrait(customerIdentifier, file);
} else if (editAction == EditAction.DELETE) {
editCustomerProfilePresenter.deleteCustomerPortrait(customerIdentifier);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
<string name="portrait_uploaded_successfully">Portrait uploaded successfully</string>
<string name="portrait_deleted_successfully">Portrait deleted successfully</string>
<string name="portrait_size_can_not_exceed">Portrait can\'t exceed size of 512KB.</string>
<string name="select_photo">Please select photo to upload</string>
<string name="customer_deposit_account">Customer deposit account</string>
<string name="customer_created_successfully">%1$s created successfully</string>
<string name="customer_updated_successfully">%1$s updated successfully</string>
Expand Down