fix exception on nothing found

This commit is contained in:
Christian Schabesberger 2018-08-18 14:20:36 +02:00
parent 98c65fb9b7
commit eacbaa3680
1 changed files with 4 additions and 1 deletions

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);
}