Skip to content

Commit

Permalink
Fix:Empty Signature Uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshGautam authored and therajanmaurya committed Jan 18, 2018
1 parent 42c82a6 commit 8f74dd9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ public void showProgressbar(boolean b) {

@Override
public void saveAndUploadSignature() {
signView.saveSignature(mClientId);
if (signView.getXCoordinateSize() > 0 && signView.getYCoordinateSize() > 0) {
signView.saveSignature(mClientId);
} else {
Toaster.show(rootView, R.string.empty_signature);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,12 @@ public void clear() {
destroyDrawingCache();
invalidate();
}

public int getXCoordinateSize() {
return mXCoordinateList.size();
}

public int getYCoordinateSize() {
return mYCoordinateList.size();
}
}
1 change: 1 addition & 0 deletions mifosng-android/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@
<string name="sign_dir_not_created_msg">Something went wrong. Couldn\'t create directory.</string>
<string name="sign_saved_success_msg">File saved successfully in </string>
<string name="uploading_sign_msg">Uploading signature %#8230</string>
<string name="empty_signature">No Signature Recorded</string>
<!-- Signature Related Strings Ends -->


Expand Down

0 comments on commit 8f74dd9

Please sign in to comment.