AB test the presence of the ideas tab

pull/14/head
Sam Bosley 13 years ago
parent 38f8ad4c43
commit e4920c3156

@ -55,6 +55,9 @@
<!-- enable third party addons preference -->
<string name="p_third_party_addons">third_party_addons</string>
<!-- show ideas tab preference -->
<string name="p_ideas_tab_enabled">ideas_tab_enabled</string>
<string-array name="TEA_reminder_random_hours">
<!-- values (in hours) associated with items above. -->
<item>1</item>

@ -615,6 +615,10 @@
<string name="EPr_third_party_addons_desc_enabled">Third party add-ons will be enabled</string>
<string name="EPr_third_party_addons_desc_disabled">Third party add-ons will be disabled</string>
<!-- Preferences: ideas tab -->
<string name="EPr_ideas_tab_enabled">Task Ideas</string>
<string name="EPr_ideas_tab_description">Get ideas to help you complete tasks</string>
<string name="EPr_swipe_lists_restart_alert">You will need to restart Astrid for this change to take effect</string>
<string-array name="EPr_swipe_lists_performance_mode">

@ -18,4 +18,8 @@
<CheckBoxPreference
android:key="@string/p_third_party_addons"
android:title="@string/EPr_third_party_addons" />
<CheckBoxPreference
android:key="@string/p_ideas_tab_enabled"
android:title="@string/EPr_ideas_tab_enabled"
android:summary="EPr_ideas_tab_description" />
</PreferenceScreen>

@ -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;

@ -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$

@ -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);
}

Loading…
Cancel
Save