wait for uploads to finish before saving channel form

This commit is contained in:
Akinwale Ariwodola 2020-05-25 06:00:34 +01:00
parent 731960da7c
commit aaec6ac6a3
2 changed files with 8 additions and 3 deletions

View file

@ -211,7 +211,7 @@ public class ChannelFormFragment extends BaseFragment implements
@Override
public void onClick(View view) {
if (uploading) {
Snackbar.make(getView(), R.string.wait_for_upload, Snackbar.LENGTH_LONG).show();
Snackbar.make(view, R.string.wait_for_upload, Snackbar.LENGTH_LONG).show();
return;
}
@ -222,6 +222,11 @@ public class ChannelFormFragment extends BaseFragment implements
buttonSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (uploading) {
Snackbar.make(view, R.string.wait_for_upload, Snackbar.LENGTH_LONG).show();
return;
}
Claim claimToSave = buildChannelClaimToSave();
validateAndSaveClaim(claimToSave);
}

View file

@ -428,10 +428,10 @@ public class PublishFormFragment extends BaseFragment implements
@Override
public void onClick(View view) {
if (uploading) {
Snackbar.make(view, R.string.publish_no_thumbnail, Snackbar.LENGTH_LONG).show();
Snackbar.make(view, R.string.publish_thumbnail_in_progress, Snackbar.LENGTH_LONG).show();
return;
} else if (Helper.isNullOrEmpty(uploadedThumbnailUrl)) {
showError(getString(R.string.publish_thumbnail_in_progress));
showError(getString(R.string.publish_no_thumbnail));
return;
}