Fix crash when comparing list items

gtask_related_email
Alex Baker 5 years ago
parent f7fc780869
commit f44b4a87b2

@ -3,6 +3,7 @@ package com.todoroo.astrid.api;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.google.common.base.Objects;
import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Join; import com.todoroo.andlib.sql.Join;
import com.todoroo.andlib.sql.QueryTemplate; import com.todoroo.andlib.sql.QueryTemplate;
@ -101,6 +102,7 @@ public class CaldavFilter extends Filter {
@Override @Override
public boolean areContentsTheSame(@NonNull FilterListItem other) { public boolean areContentsTheSame(@NonNull FilterListItem other) {
return calendar.equals(((CaldavFilter) other).calendar); return super.areContentsTheSame(other)
&& Objects.equal(calendar, ((CaldavFilter) other).calendar);
} }
} }

@ -3,6 +3,7 @@ package com.todoroo.astrid.api;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.google.common.base.Objects;
import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.sql.Criterion;
import com.todoroo.andlib.sql.Join; import com.todoroo.andlib.sql.Join;
import com.todoroo.andlib.sql.QueryTemplate; import com.todoroo.andlib.sql.QueryTemplate;
@ -126,6 +127,6 @@ public class GtasksFilter extends Filter {
@Override @Override
public boolean areContentsTheSame(@NonNull FilterListItem other) { public boolean areContentsTheSame(@NonNull FilterListItem other) {
return list.equals(((GtasksFilter) other).list); return super.areContentsTheSame(other) && Objects.equal(list, ((GtasksFilter) other).list);
} }
} }

Loading…
Cancel
Save