From 233462a6dd30fd7cb6b3c6e77a1ce19b4075fb2c Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 6 Jun 2012 13:37:14 -0700 Subject: [PATCH] Fixed a sql query that was causing duplicates in the I've assigned filter --- .../com/todoroo/astrid/core/CustomFilterExposer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/core/CustomFilterExposer.java b/astrid/plugin-src/com/todoroo/astrid/core/CustomFilterExposer.java index 41502606c..99777610b 100644 --- a/astrid/plugin-src/com/todoroo/astrid/core/CustomFilterExposer.java +++ b/astrid/plugin-src/com/todoroo/astrid/core/CustomFilterExposer.java @@ -135,11 +135,11 @@ public final class CustomFilterExposer extends BroadcastReceiver implements Astr int themeFlags = isTablet ? ThemeService.FLAG_FORCE_LIGHT : 0; Filter f = new Filter(r.getString(R.string.BFE_Assigned), r.getString(R.string.BFE_Assigned), - new QueryTemplate().join(Join.left(Metadata.TABLE, Task.ID.eq(Metadata.TASK))) + new QueryTemplate().join(Join.left(Metadata.TABLE, Criterion.and(Metadata.KEY.eq(TaskRabbitMetadata.METADATA_KEY), Task.ID.eq(Metadata.TASK)))) .where(Criterion.and(TaskCriteria.isActive(), Criterion.or(Task.CREATOR_ID.eq(0), Task.CREATOR_ID.eq(ActFmPreferenceService.userId())), Criterion.or(Task.USER_ID.neq(0), - Criterion.and(Metadata.KEY.eq(TaskRabbitMetadata.METADATA_KEY), TaskRabbitMetadata.ID.gt(0))))), + TaskRabbitMetadata.ID.gt(0)))), null); f.listingIcon = ((BitmapDrawable)r.getDrawable( ThemeService.getDrawable(R.drawable.filter_assigned, themeFlags))).getBitmap();