From 444c9f592452f7d7234d9d0c3cc3e240e350ab93 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 13 Jul 2012 14:47:54 -0700 Subject: [PATCH] Fixed a display bug where the wrong default calendar would be displayed --- astrid/plugin-src/com/todoroo/astrid/gcal/GCalControlSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/gcal/GCalControlSet.java b/astrid/plugin-src/com/todoroo/astrid/gcal/GCalControlSet.java index eda00d074..2acc8cb92 100644 --- a/astrid/plugin-src/com/todoroo/astrid/gcal/GCalControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/gcal/GCalControlSet.java @@ -227,10 +227,10 @@ public class GCalControlSet extends PopupControlSet { calendar.setText(R.string.gcal_TEA_none_selected); } } else { - int index = calendars.defaultIndex + 1; + int index = calendars.defaultIndex; if (!TextUtils.isEmpty(model.getValue(Task.CALENDAR_URI))) { calendar.setText(R.string.gcal_TEA_has_event); - } else if (index != 0 && index < calendars.calendars.length) { + } else if (index >= 0 && index < calendars.calendars.length) { calendar.setText(calendars.calendars[index]); } else { calendar.setText(R.string.gcal_TEA_none_selected);