Fixed an off by one error that was causing a null pointer exception in filter list activity

pull/14/head
Sam Bosley 13 years ago
parent 671791670c
commit b0cb09dc11

@ -6,6 +6,7 @@
<classpathentry excluding="com/todoroo/astrid/rmilk/EditOperationExposer.java|com/todoroo/astrid/rmilk/MilkEditActivity.java|com/todoroo/astrid/actfm/TaskFields.java|com/todoroo/astrid/actfm/ShowProjectExposer.java|com/todoroo/astrid/actfm/ProjectDetailExposer.java|com/todoroo/astrid/actfm/ProjectListActivity.java" kind="src" path="plugin-src"/> <classpathentry excluding="com/todoroo/astrid/rmilk/EditOperationExposer.java|com/todoroo/astrid/rmilk/MilkEditActivity.java|com/todoroo/astrid/actfm/TaskFields.java|com/todoroo/astrid/actfm/ShowProjectExposer.java|com/todoroo/astrid/actfm/ProjectDetailExposer.java|com/todoroo/astrid/actfm/ProjectListActivity.java" kind="src" path="plugin-src"/>
<classpathentry kind="src" path="gen"/> <classpathentry kind="src" path="gen"/>
<classpathentry kind="src" path="rmilk-src"/> <classpathentry kind="src" path="rmilk-src"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="lib" path="libs/annotations.jar"/> <classpathentry exported="true" kind="lib" path="libs/annotations.jar"/>
<classpathentry exported="true" kind="lib" path="libs/commons-codec-1.3.jar"/> <classpathentry exported="true" kind="lib" path="libs/commons-codec-1.3.jar"/>
@ -26,7 +27,6 @@
<classpathentry exported="true" kind="lib" path="libs/google-oauth-client-extensions-1.5.0-beta.jar"/> <classpathentry exported="true" kind="lib" path="libs/google-oauth-client-extensions-1.5.0-beta.jar"/>
<classpathentry exported="true" kind="lib" path="libs/gson-1.6.jar"/> <classpathentry exported="true" kind="lib" path="libs/gson-1.6.jar"/>
<classpathentry exported="true" kind="lib" path="libs/google-api-services-tasks-v1-1.2.5-beta.jar"/> <classpathentry exported="true" kind="lib" path="libs/google-api-services-tasks-v1-1.2.5-beta.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="libs/crittercism_v1_1_3.jar"/> <classpathentry kind="lib" path="libs/crittercism_v1_1_3.jar"/>
<classpathentry kind="output" path="bin/classes"/> <classpathentry kind="output" path="bin/classes"/>
</classpath> </classpath>

@ -157,8 +157,8 @@ public class TagFilterExposer extends BroadcastReceiver implements AstridFilterE
untagged.listingIcon = ((BitmapDrawable)r.getDrawable(R.drawable.gl_lists)).getBitmap(); untagged.listingIcon = ((BitmapDrawable)r.getDrawable(R.drawable.gl_lists)).getBitmap();
filters[0] = untagged; filters[0] = untagged;
for(int i = 1; i < tags.length; i++) for(int i = 0; i < tags.length; i++)
filters[i] = filterFromTag(context, tags[i - 1], TaskCriteria.activeAndVisible()); filters[i+1] = filterFromTag(context, tags[i], TaskCriteria.activeAndVisible());
FilterCategory filter = new FilterCategory(context.getString(name), filters); FilterCategory filter = new FilterCategory(context.getString(name), filters);
return filter; return filter;
} }

Loading…
Cancel
Save