Skip to content

Commit

Permalink
Merge pull request #31 from picomatic/master
Browse files Browse the repository at this point in the history
left swipe deletes wrong item when filter is active fixed
  • Loading branch information
Kamuno authored Mar 9, 2019
2 parents 8c94f43 + 94d8117 commit ebacb6e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,16 @@ public void onClick(View view) {

public void deleteItem(int position) {

MetaData toDeleteMetaData = metadatalist.get(position);
MetaData toDeleteMetaData = adapter.getItem(position);
final MetaData toDeleteMetaDataFinal = toDeleteMetaData;

//Removes MetaData from DB
database.deleteMetaData(toDeleteMetaData);

//Removes MetaData from List in View
metadatalist.remove(position);
adapter.removeItem(position);
metadatalist.remove(toDeleteMetaData);


final int finalPosition = position;

Expand Down

0 comments on commit ebacb6e

Please sign in to comment.