From a209e87c69f4e92fb6e6fa07436510f4aa2e5c1f Mon Sep 17 00:00:00 2001 From: ktprograms Date: Sat, 21 Aug 2021 09:30:40 +0800 Subject: [PATCH] Add Loading Channel Details Toast --- .../main/java/org/schabi/newpipe/util/StreamDialogEntry.java | 5 +++-- app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index f3c15b8b0..8f6c92d39 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -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 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 00910eed0..f8ed5ee62 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -755,5 +755,7 @@ Tablet mode On Off + Error at Show Channel Details + Loading Channel Details… \ No newline at end of file