From f44b4a87b20ca28f050702ba058656370515f98a Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Sat, 7 Dec 2019 09:06:42 -0600 Subject: [PATCH] Fix crash when comparing list items --- app/src/main/java/com/todoroo/astrid/api/CaldavFilter.java | 4 +++- app/src/main/java/com/todoroo/astrid/api/GtasksFilter.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/todoroo/astrid/api/CaldavFilter.java b/app/src/main/java/com/todoroo/astrid/api/CaldavFilter.java index 0d7a2800c..a27c26ba6 100644 --- a/app/src/main/java/com/todoroo/astrid/api/CaldavFilter.java +++ b/app/src/main/java/com/todoroo/astrid/api/CaldavFilter.java @@ -3,6 +3,7 @@ package com.todoroo.astrid.api; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; +import com.google.common.base.Objects; import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.sql.Join; import com.todoroo.andlib.sql.QueryTemplate; @@ -101,6 +102,7 @@ public class CaldavFilter extends Filter { @Override public boolean areContentsTheSame(@NonNull FilterListItem other) { - return calendar.equals(((CaldavFilter) other).calendar); + return super.areContentsTheSame(other) + && Objects.equal(calendar, ((CaldavFilter) other).calendar); } } diff --git a/app/src/main/java/com/todoroo/astrid/api/GtasksFilter.java b/app/src/main/java/com/todoroo/astrid/api/GtasksFilter.java index e8fdccfd1..d48bbd9e8 100644 --- a/app/src/main/java/com/todoroo/astrid/api/GtasksFilter.java +++ b/app/src/main/java/com/todoroo/astrid/api/GtasksFilter.java @@ -3,6 +3,7 @@ package com.todoroo.astrid.api; import android.os.Parcel; import android.os.Parcelable; import androidx.annotation.NonNull; +import com.google.common.base.Objects; import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.sql.Join; import com.todoroo.andlib.sql.QueryTemplate; @@ -126,6 +127,6 @@ public class GtasksFilter extends Filter { @Override public boolean areContentsTheSame(@NonNull FilterListItem other) { - return list.equals(((GtasksFilter) other).list); + return super.areContentsTheSame(other) && Objects.equal(list, ((GtasksFilter) other).list); } }