fix exception on nothing found
This commit is contained in:
parent
339a703f16
commit
7f56a9e681
1 changed files with 4 additions and 1 deletions
|
|
@ -836,7 +836,10 @@ public class SearchFragment
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleResult(@NonNull SearchInfo result) {
|
public void handleResult(@NonNull SearchInfo result) {
|
||||||
if (!result.getErrors().isEmpty()) {
|
final List<Throwable> exceptions = result.getErrors();
|
||||||
|
if (!exceptions.isEmpty()
|
||||||
|
&& !(exceptions.size() == 1
|
||||||
|
&& exceptions.get(0) instanceof SearchExtractor.NothingFoundException)){
|
||||||
showSnackBarError(result.getErrors(), UserAction.SEARCHED,
|
showSnackBarError(result.getErrors(), UserAction.SEARCHED,
|
||||||
NewPipe.getNameOfService(serviceId), searchString, 0);
|
NewPipe.getNameOfService(serviceId), searchString, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue