diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-10-21 00:30:29 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-10-21 00:30:29 +0300 |
commit | a490a072672e7b9d2e5500209b36ed5439285d70 (patch) | |
tree | 5205634c53c65604bf5c56d5dbc896043fc52dd3 /app/src/main/java/it/niedermann/owncloud/notes/shared | |
parent | a4fe52578b081ae462682f2e45334f20b35f5488 (diff) |
Use Saved State Module for MainViewModel
Diffstat (limited to 'app/src/main/java/it/niedermann/owncloud/notes/shared')
-rw-r--r-- | app/src/main/java/it/niedermann/owncloud/notes/shared/model/NavigationCategory.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/shared/model/NavigationCategory.java b/app/src/main/java/it/niedermann/owncloud/notes/shared/model/NavigationCategory.java index f54156df..53b3c2cd 100644 --- a/app/src/main/java/it/niedermann/owncloud/notes/shared/model/NavigationCategory.java +++ b/app/src/main/java/it/niedermann/owncloud/notes/shared/model/NavigationCategory.java @@ -40,6 +40,25 @@ public class NavigationCategory implements Serializable { } @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof NavigationCategory)) return false; + + NavigationCategory that = (NavigationCategory) o; + + if (type != that.type) return false; + return category != null ? category.equals(that.category) : that.category == null; + } + + @Override + public int hashCode() { + int result = type.hashCode(); + result = 31 * result + (category != null ? category.hashCode() : 0); + return result; + } + + @NonNull + @Override public String toString() { return "NavigationCategory{" + "type=" + type + |