From 0cb325f4b1b7af6209a7684e25f292600c7bc80c Mon Sep 17 00:00:00 2001 From: Matthew Wong Date: Wed, 12 Aug 2015 10:05:43 -0400 Subject: Fix #118: use File.equals --- app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java index 75d0838c..4f129851 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java @@ -90,9 +90,8 @@ public class PasswordItem implements Comparable{ public boolean equals(Object o){ PasswordItem other = (PasswordItem) o; // Makes it possible to have a category and a password with the same name - return (other.getType() + other.getName()) - .equals(this.getType() + this.getName()); - } + return (other.getFile().equals(this.getFile())); +} @Override public int compareTo(Object o) { -- cgit v1.2.3