From 514a83df60bee97bb21b84f9df58561b1376707a Mon Sep 17 00:00:00 2001 From: Tim Su Date: Fri, 24 Feb 2012 15:55:07 -0800 Subject: [PATCH] For simplicity and performance, kill the 'tags that start with _' tasks being hidden from the inbox --- .../com/todoroo/astrid/core/CoreFilterExposer.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/core/CoreFilterExposer.java b/astrid/plugin-src/com/todoroo/astrid/core/CoreFilterExposer.java index d08e1b6f2..a29f1916f 100644 --- a/astrid/plugin-src/com/todoroo/astrid/core/CoreFilterExposer.java +++ b/astrid/plugin-src/com/todoroo/astrid/core/CoreFilterExposer.java @@ -12,18 +12,13 @@ import android.graphics.drawable.BitmapDrawable; import com.timsu.astrid.R; import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.sql.Criterion; -import com.todoroo.andlib.sql.Query; import com.todoroo.andlib.sql.QueryTemplate; import com.todoroo.astrid.activity.FilterListFragment; import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridFilterExposer; import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.FilterListItem; -import com.todoroo.astrid.dao.MetadataDao.MetadataCriteria; -import com.todoroo.astrid.data.Metadata; -import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.TaskApiDao.TaskCriteria; -import com.todoroo.astrid.tags.TagService; /** * Exposes Astrid's built in filters to the {@link FilterListFragment} @@ -61,10 +56,7 @@ public final class CoreFilterExposer extends BroadcastReceiver implements Astrid public static Filter buildInboxFilter(Resources r) { Filter inbox = new Filter(r.getString(R.string.BFE_Active), r.getString(R.string.BFE_Active), new QueryTemplate().where( - Criterion.and(TaskCriteria.activeVisibleMine(), - Criterion.not(Task.ID.in(Query.select(Metadata.TASK).from(Metadata.TABLE).where( - Criterion.and(MetadataCriteria.withKey(TagService.KEY), - TagService.TAG.like("x_%", "x"))))))), //$NON-NLS-1$ //$NON-NLS-2$ + Criterion.and(TaskCriteria.activeVisibleMine())), null); inbox.listingIcon = ((BitmapDrawable)r.getDrawable(R.drawable.filter_inbox)).getBitmap(); return inbox;