Fixed up rtm addon appearing in 'available' list

pull/14/head
Tim Su 16 years ago
parent 2c64b35504
commit 7924b4a5be

@ -75,7 +75,6 @@ import com.todoroo.astrid.alarms.AlarmControlSet;
import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.dao.Database; import com.todoroo.astrid.dao.Database;
import com.todoroo.astrid.gcal.GCalControlSet; import com.todoroo.astrid.gcal.GCalControlSet;
import com.todoroo.astrid.model.AddOn;
import com.todoroo.astrid.model.Task; import com.todoroo.astrid.model.Task;
import com.todoroo.astrid.producteev.ProducteevControlSet; import com.todoroo.astrid.producteev.ProducteevControlSet;
import com.todoroo.astrid.producteev.ProducteevUtilities; import com.todoroo.astrid.producteev.ProducteevUtilities;
@ -252,8 +251,7 @@ public final class TaskEditActivity extends TabActivity {
LinearLayout addonsAddons = (LinearLayout) findViewById(R.id.tab_addons_addons); LinearLayout addonsAddons = (LinearLayout) findViewById(R.id.tab_addons_addons);
try { try {
AddOn producteevAddon = addOnService.getAddOn(AddOnService.PRODUCTEEV_PACKAGE, "Producteev"); //$NON-NLS-1$ if(ProducteevUtilities.INSTANCE.isLoggedIn()) {
if (addOnService.isInstalled(producteevAddon) && ProducteevUtilities.INSTANCE.isLoggedIn()) {
controls.add(new ProducteevControlSet(this, addonsAddons)); controls.add(new ProducteevControlSet(this, addonsAddons));
((TextView)findViewById(R.id.notes)).setHint(R.string.producteev_TEA_notes); ((TextView)findViewById(R.id.notes)).setHint(R.string.producteev_TEA_notes);
((TextView)findViewById(R.id.notes_label)).setHint(R.string.producteev_TEA_notes); ((TextView)findViewById(R.id.notes_label)).setHint(R.string.producteev_TEA_notes);

@ -42,9 +42,6 @@ public class AddOnService {
/** Astrid Locale package */ /** Astrid Locale package */
public static final String LOCALE_PACKAGE = "com.todoroo.astrid.locale"; public static final String LOCALE_PACKAGE = "com.todoroo.astrid.locale";
/** Astrid Producteev package */
public static final String PRODUCTEEV_PACKAGE = "com.todoroo.astrid.producteev";
/** Astrid Power Pack label */ /** Astrid Power Pack label */
public static final String POWER_PACK_LABEL = "Astrid Power Pack"; public static final String POWER_PACK_LABEL = "Astrid Power Pack";
@ -171,7 +168,7 @@ public class AddOnService {
return true; return true;
if(LOCALE_PACKAGE.equals(packageName)) if(LOCALE_PACKAGE.equals(packageName))
return true; return true;
if(PRODUCTEEV_PACKAGE.equals(packageName)) if(Constants.PACKAGE.equals(packageName))
return true; return true;
Context context = ContextManager.getContext(); Context context = ContextManager.getContext();
@ -234,7 +231,7 @@ public class AddOnService {
list[2] = new AddOn(true, true, "Producteev", null, list[2] = new AddOn(true, true, "Producteev", null,
"Synchronize with Producteev service. Also changes Astrid's importance levels to stars.", "Synchronize with Producteev service. Also changes Astrid's importance levels to stars.",
PRODUCTEEV_PACKAGE, "http://www.producteev.com", Constants.PACKAGE, "http://www.producteev.com",
((BitmapDrawable)r.getDrawable(R.drawable.icon_producteev)).getBitmap()); ((BitmapDrawable)r.getDrawable(R.drawable.icon_producteev)).getBitmap());
list[3] = new AddOn(true, true, "Remember the Milk", null, list[3] = new AddOn(true, true, "Remember the Milk", null,

Loading…
Cancel
Save