fix exception on nothing found

This commit is contained in:
Christian Schabesberger 2018-08-18 14:20:36 +02:00
parent 98c65fb9b7
commit eacbaa3680

View file

@ -836,7 +836,10 @@ public class SearchFragment
@Override
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,
NewPipe.getNameOfService(serviceId), searchString, 0);
}