From 01aab25889aa0daabf3c476bcda0e1b12ee6dfd6 Mon Sep 17 00:00:00 2001 From: Eric Xu Date: Sat, 22 May 2021 00:07:56 -0400 Subject: [PATCH] Add Tab.hashCode() to go with equals --- app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java index faa5aeba9..ef683c033 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java +++ b/app/src/main/java/org/schabi/newpipe/settings/tabs/Tab.java @@ -119,6 +119,11 @@ public abstract class Tab { return getTabId() == other.getTabId(); } + @Override + public int hashCode() { + return Objects.hashCode(getTabId()); + } + /*////////////////////////////////////////////////////////////////////////// // JSON Handling //////////////////////////////////////////////////////////////////////////*/