mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-21 23:48:18 -05:00
Filter out books with null language
This commit is contained in:
parent
651a319edd
commit
60075184ea
@ -120,7 +120,7 @@ public class BookListFragment extends BaseFragment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void displayLanguageSpinner() {
|
void displayLanguageSpinner() {
|
||||||
ArrayAdapter<Object> adapter = new ArrayAdapter<Object>(this.getActivity(),
|
ArrayAdapter<Object> adapter = new ArrayAdapter<>(this.getActivity(),
|
||||||
android.R.layout.simple_spinner_item,
|
android.R.layout.simple_spinner_item,
|
||||||
availableLanguages.toArray());
|
availableLanguages.toArray());
|
||||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||||
@ -166,6 +166,12 @@ public class BookListFragment extends BaseFragment {
|
|||||||
return book.getBookCategory() == category;
|
return book.getBookCategory() == category;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.filter(new Func1<Book, Boolean>() {
|
||||||
|
@Override
|
||||||
|
public Boolean call(Book book) {
|
||||||
|
return book.getLanguage() != null;
|
||||||
|
}
|
||||||
|
})
|
||||||
.filter(new Func1<Book, Boolean>() {
|
.filter(new Func1<Book, Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
public Boolean call(Book book) {
|
public Boolean call(Book book) {
|
||||||
|
Loading…
Reference in New Issue
Block a user