Add Loading Channel Details Toast

This commit is contained in:
ktprograms 2021-08-21 09:30:40 +08:00
parent 967bdf8f08
commit a209e87c69
2 changed files with 5 additions and 2 deletions

View File

@ -37,7 +37,8 @@ public enum StreamDialogEntry {
if (isNullOrEmpty(item.getUploaderUrl())) {
final int serviceId = item.getServiceId();
final String url = item.getUrl();
// TODO: Some visual loading indicator
Toast.makeText(fragment.getContext(), R.string.loading_channel_details,
Toast.LENGTH_SHORT).show();
ExtractorHelper.getStreamInfo(serviceId, url, false)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -46,7 +47,7 @@ public enum StreamDialogEntry {
.setUploaderUrl(serviceId, url, result.getUploaderUrl())
.subscribeOn(Schedulers.io()).subscribe();
openChannelFragment(fragment, item, result.getUploaderUrl());
}, throwable -> Toast.makeText(
}, throwable -> Toast.makeText( // TODO: Open the Error Activity
fragment.getContext(),
R.string.error_show_channel_details,
Toast.LENGTH_SHORT

View File

@ -755,5 +755,7 @@
<string name="tablet_mode_title">Tablet mode</string>
<string name="on">On</string>
<string name="off">Off</string>
<!-- Show Channel Details -->
<string name="error_show_channel_details">Error at Show Channel Details</string>
<string name="loading_channel_details">Loading Channel Details…</string>
</resources>