Also show toast in openDownloadDialog()
and lengthened a bit to inform user to wait...
This commit is contained in:
parent
b175774ad8
commit
c1f37d8591
1 changed files with 13 additions and 7 deletions
|
@ -669,13 +669,7 @@ public class RouterActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openAddToPlaylistDialog() {
|
private void openAddToPlaylistDialog() {
|
||||||
// Getting the stream info usually takes a moment
|
pleaseWait();
|
||||||
// Notifying the user here to ensure that no confusion arises
|
|
||||||
Toast.makeText(
|
|
||||||
getApplicationContext(),
|
|
||||||
getString(R.string.processing_may_take_a_moment),
|
|
||||||
Toast.LENGTH_SHORT)
|
|
||||||
.show();
|
|
||||||
|
|
||||||
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false)
|
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, false)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
|
@ -705,6 +699,8 @@ public class RouterActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@SuppressLint("CheckResult")
|
@SuppressLint("CheckResult")
|
||||||
private void openDownloadDialog() {
|
private void openDownloadDialog() {
|
||||||
|
pleaseWait();
|
||||||
|
|
||||||
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, true)
|
disposables.add(ExtractorHelper.getStreamInfo(currentServiceId, currentUrl, true)
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
|
@ -719,6 +715,16 @@ public class RouterActivity extends AppCompatActivity {
|
||||||
}, throwable -> showUnsupportedUrlDialog(currentUrl)));
|
}, throwable -> showUnsupportedUrlDialog(currentUrl)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void pleaseWait() {
|
||||||
|
// Getting the stream info usually takes a moment
|
||||||
|
// Notifying the user here to ensure that no confusion arises
|
||||||
|
Toast.makeText(
|
||||||
|
getApplicationContext(),
|
||||||
|
getString(R.string.processing_may_take_a_moment),
|
||||||
|
Toast.LENGTH_LONG)
|
||||||
|
.show();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(final int requestCode,
|
public void onRequestPermissionsResult(final int requestCode,
|
||||||
@NonNull final String[] permissions,
|
@NonNull final String[] permissions,
|
||||||
|
|
Loading…
Reference in a new issue