Browse Source

Fix removing the BookmarksEvent.Deleted instead of the actual bookmark

master
Stefano Pacifici 9 years ago
parent
commit
2619210f8c
  1. 2
      app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java

2
app/src/main/java/acr/browser/lightning/fragment/BookmarksFragment.java

@ -224,7 +224,7 @@ public class BookmarksFragment extends Fragment implements View.OnClickListener,
public void bookmarkDeleted(final BookmarkEvents.Deleted event) { public void bookmarkDeleted(final BookmarkEvents.Deleted event) {
final HistoryItem item = event.item; final HistoryItem item = event.item;
final int size = mBookmarks.size(); final int size = mBookmarks.size();
mBookmarks.remove(event); mBookmarks.remove(event.item);
assert mBookmarks.size() < size; assert mBookmarks.size() < size;
mBookmarkAdapter.notifyDataSetChanged(); mBookmarkAdapter.notifyDataSetChanged();
} }

Loading…
Cancel
Save