only show Progress Dialog if necessary when sending toot (#1470)
This commit is contained in:
parent
344863b5d4
commit
d83e7c4c70
2 changed files with 8 additions and 0 deletions
|
@ -1101,6 +1101,10 @@ public final class ComposeActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readyStatus(final Status.Visibility visibility, final boolean sensitive) {
|
private void readyStatus(final Status.Visibility visibility, final boolean sensitive) {
|
||||||
|
if (waitForMediaLatch.isEmpty()) {
|
||||||
|
onReadySuccess(visibility, sensitive);
|
||||||
|
return;
|
||||||
|
}
|
||||||
finishingUploadDialog = ProgressDialog.show(
|
finishingUploadDialog = ProgressDialog.show(
|
||||||
this, getString(R.string.dialog_title_finishing_media_upload),
|
this, getString(R.string.dialog_title_finishing_media_upload),
|
||||||
getString(R.string.dialog_message_uploading_media), true, true);
|
getString(R.string.dialog_message_uploading_media), true, true);
|
||||||
|
|
|
@ -44,4 +44,8 @@ public class CountUpDownLatch {
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public synchronized boolean isEmpty() {
|
||||||
|
return count == 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue