Skip to content

Commit ef0d562

Browse files
committed
Use ErrorActivity to notifiy about errors occourred while loading channel details
1 parent 962fe9c commit ef0d562

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

app/src/main/java/org/schabi/newpipe/util/StreamDialogDefaultEntry.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ public enum StreamDialogDefaultEntry {
5959
.setUploaderUrl(serviceId, url, result.getUploaderUrl())
6060
.subscribeOn(Schedulers.io()).subscribe();
6161
openChannelFragment(fragment, item, result.getUploaderUrl());
62-
}, throwable -> Toast.makeText(
63-
// TODO: Open the Error Activity
64-
fragment.getContext(),
65-
R.string.error_show_channel_details,
66-
Toast.LENGTH_SHORT
67-
).show());
62+
}, throwable -> ErrorUtil.openActivity(
63+
fragment.requireContext(),
64+
new ErrorInfo(
65+
throwable,
66+
UserAction.REQUESTED_CHANNEL,
67+
url,
68+
serviceId
69+
)));
6870
} else {
6971
openChannelFragment(fragment, item, item.getUploaderUrl());
7072
}

0 commit comments

Comments
 (0)