mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Fix lint warnings
This commit is contained in:
parent
faa8e272a4
commit
61ce110855
@ -80,7 +80,7 @@ class BookmarksAdapter extends RecyclerView.Adapter<BookmarksAdapter.Item> {
|
||||
boolean onItemLongClick(ImageView favicon, BookmarkItem bookmark);
|
||||
}
|
||||
|
||||
class Item extends RecyclerView.ViewHolder {
|
||||
static class Item extends RecyclerView.ViewHolder {
|
||||
@BindView(R2.id.favicon)
|
||||
ImageView favicon;
|
||||
@BindView(R2.id.title)
|
||||
|
@ -26,6 +26,7 @@ import io.reactivex.SingleObserver;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.kiwix.kiwixmobile.core.base.BasePresenter;
|
||||
import org.kiwix.kiwixmobile.core.data.DataSource;
|
||||
import org.kiwix.kiwixmobile.core.di.qualifiers.Computation;
|
||||
@ -61,7 +62,9 @@ class BookmarksPresenter extends BasePresenter<BookmarksContract.View>
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<BookmarkItem> bookmarks) {
|
||||
view.updateBookmarksList(bookmarks);
|
||||
if (view != null) {
|
||||
view.updateBookmarksList(bookmarks);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -72,7 +75,7 @@ class BookmarksPresenter extends BasePresenter<BookmarksContract.View>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void filterBookmarks(List<BookmarkItem> bookmarks, String newText) {
|
||||
public void filterBookmarks(@NotNull List<BookmarkItem> bookmarks, @NotNull String newText) {
|
||||
Observable.fromIterable(bookmarks)
|
||||
.filter(
|
||||
bookmark -> bookmark.getBookmarkTitle().toLowerCase().contains(newText.toLowerCase()))
|
||||
@ -87,7 +90,9 @@ class BookmarksPresenter extends BasePresenter<BookmarksContract.View>
|
||||
|
||||
@Override
|
||||
public void onSuccess(List<BookmarkItem> bookmarkList) {
|
||||
view.notifyBookmarksListFiltered(bookmarkList);
|
||||
if (view != null) {
|
||||
view.notifyBookmarksListFiltered(bookmarkList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -98,7 +103,7 @@ class BookmarksPresenter extends BasePresenter<BookmarksContract.View>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBookmarks(List<BookmarkItem> deleteList) {
|
||||
public void deleteBookmarks(@NotNull List<BookmarkItem> deleteList) {
|
||||
dataSource.deleteBookmarks(deleteList)
|
||||
.subscribe(new CompletableObserver() {
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user