diff --git a/astrid/res/values/keys.xml b/astrid/res/values/keys.xml index 4f7f5e948..891fd7899 100644 --- a/astrid/res/values/keys.xml +++ b/astrid/res/values/keys.xml @@ -55,6 +55,9 @@ third_party_addons + + ideas_tab_enabled + 1 diff --git a/astrid/res/values/strings-core.xml b/astrid/res/values/strings-core.xml index c47bec539..4c806f404 100644 --- a/astrid/res/values/strings-core.xml +++ b/astrid/res/values/strings-core.xml @@ -615,6 +615,10 @@ Third party add-ons will be enabled Third party add-ons will be disabled + + Task Ideas + Get ideas to help you complete tasks + You will need to restart Astrid for this change to take effect diff --git a/astrid/res/xml/preferences_labs.xml b/astrid/res/xml/preferences_labs.xml index 781241633..f658eae6e 100644 --- a/astrid/res/xml/preferences_labs.xml +++ b/astrid/res/xml/preferences_labs.xml @@ -18,4 +18,8 @@ + diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java index 399f61ad3..84b6b0a7b 100755 --- a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java @@ -390,7 +390,7 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener { boolean hasTitle = !TextUtils.isEmpty(model.getValue(Task.TITLE)); - if(hasTitle) + if(hasTitle && Preferences.getBoolean(R.string.p_ideas_tab_enabled, false)) tabStyle = TAB_STYLE_ACTIVITY_WEB; else tabStyle = TAB_STYLE_ACTIVITY; diff --git a/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java b/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java index 301de6800..800d609dc 100644 --- a/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java +++ b/astrid/src/com/todoroo/astrid/service/abtesting/ABTests.java @@ -120,8 +120,12 @@ public class ABTests { addTest(AB_TEST_REENGAGEMENT_ENABLED, new int[] { 1, 9 }, new int[] { 1, 9 }, new String[] { "reengagement-disabled", "reengagement-enabled" }); //$NON-NLS-1$ //$NON-NLS-2$ + + addTest(AB_TEST_IDEAS_TAB, new int[] { 1, 1 }, + new int[] { 0, 1 }, new String[] { "ideas-tab-diabled", "ideas-tab-enabled" }); //$NON-NLS-1$ //$NON-NLS-2$ } + public static final String AB_TEST_IDEAS_TAB = "ideasTab"; //$NON-NLS-1$ public static final String AB_TEST_PRODUCTEEV_ENABLED = "producteev"; //$NON-NLS-1$ public static final String AB_TEST_REENGAGEMENT_ENABLED = "reengagement"; ////$NON-NLS-1$ diff --git a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java index 5e3e56478..be6d72e3f 100644 --- a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java +++ b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java @@ -61,6 +61,9 @@ public class AstridPreferences { boolean thirdPartyAddons = (ABChooser.readChoiceForTest(ABTests.AB_TEST_PRODUCTEEV_ENABLED) == 1) || ProducteevUtilities.INSTANCE.isLoggedIn(); Preferences.setIfUnset(prefs, editor, r, R.string.p_third_party_addons, thirdPartyAddons); + boolean showIdeasTab = (ABChooser.readChoiceForTest(ABTests.AB_TEST_IDEAS_TAB) == 1); + Preferences.setIfUnset(prefs, editor, r, R.string.p_ideas_tab_enabled, showIdeasTab); + if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default Preferences.setString(R.string.p_theme, ThemeService.THEME_WHITE); }