Make the advanced edit screen layout the default and remove ab test

pull/14/head
Sam Bosley 13 years ago
parent fea2d746b2
commit 509f29e001

@ -410,15 +410,15 @@
<string-array name="TEA_control_sets_beast">
<item >@string/TEA_control_who</item>
<item >@string/TEA_control_when</item>
<item >@string/TEA_control_more_section</item>
<item >@string/TEA_control_importance</item>
<item >@string/TEA_control_lists</item>
<item >@string/TEA_control_notes</item>
<item >@string/TEA_control_files</item>
<item >@string/TEA_control_more_section</item>
<item >@string/TEA_control_reminders</item>
<item >@string/TEA_control_hidden_section</item>
<item >@string/TEA_control_timer</item>
<item >@string/TEA_control_share</item>
<item >@string/TEA_control_hidden_section</item>
</string-array>
<string name="TEA_ctrl_title_pref">TEA_ctrl_title_pref</string> <!-- Deprecated -->
@ -438,15 +438,15 @@
<string-array name="TEA_control_sets_prefs">
<item>@string/TEA_ctrl_who_pref</item>
<item>@string/TEA_ctrl_when_pref</item>
<item>@string/TEA_ctrl_more_pref</item>
<item>@string/TEA_ctrl_importance_pref</item>
<item>@string/TEA_ctrl_lists_pref</item>
<item>@string/TEA_ctrl_notes_pref</item>
<item>@string/TEA_ctrl_files_pref</item>
<item>@string/TEA_ctrl_more_pref</item>
<item>@string/TEA_ctrl_reminders_pref</item>
<item>@string/TEA_ctrl_hide_section_pref</item>
<item>@string/TEA_ctrl_timer_pref</item>
<item>@string/TEA_ctrl_share_pref</item>
<item>@string/TEA_ctrl_hide_section_pref</item>
</string-array>

@ -77,31 +77,6 @@ public class BeastModePreferences extends ListActivity {
Preferences.setBoolean(BEAST_MODE_ASSERTED_HIDE_ALWAYS, true);
}
/**
* returns the beast mode preference string that would correspond to a more advanced
* used for ab testing the effect of simple edit page
*/
public static String getAdvancedEditOrderForABTest(Context c) {
ArrayList<String> defaultOrder = constructOrderedControlList(c);
String hideSectionPref = c.getString(R.string.TEA_ctrl_hide_section_pref);
String detailsSectionPref = c.getString(R.string.TEA_ctrl_more_pref);
//Move hide section to the end of the list
defaultOrder.remove(hideSectionPref);
defaultOrder.add(hideSectionPref);
// Put the last few items only under details
defaultOrder.remove(detailsSectionPref);
defaultOrder.add(defaultOrder.size() - 4, detailsSectionPref);
StringBuilder builder = new StringBuilder();
for (int i = 0; i < defaultOrder.size(); i++) {
builder.append(defaultOrder.get(i));
builder.append(BEAST_MODE_PREF_ITEM_SEPARATOR);
}
return builder.toString();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

@ -123,16 +123,11 @@ public class ABTests {
public static final String AB_SIMPLE_TASK_ROW = "android_simple_task_row"; //$NON-NLS-1$
public static final String AB_ADVANCED_EDIT = "android_advanced_edit"; //$NON-NLS-1$
private void initialize() {
addTest(AB_SIMPLE_TASK_ROW, new int[] { 1, 1 },
new int[] { 1, 0 }, new String[] { "original-row-style", "simple-row-style" });//$NON-NLS-1$ //$NON-NLS-2$
addTest(AB_ADVANCED_EDIT, new int[] { 1, 1 },
new int[] { 1, 0 }, new String[] { "default_edit", "advanced_edit" }); //$NON-NLS-1$ //$NON-NLS-2$
// AB_SWIPE_BETWEEN has to be added in the startup service since it needs a non-null context for initialization
}
}

@ -17,7 +17,6 @@ import com.todoroo.andlib.sql.Functions;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.activity.BeastModePreferences;
import com.todoroo.astrid.api.AstridApiConstants;
import com.todoroo.astrid.core.PluginServices;
import com.todoroo.astrid.data.TagData;
@ -87,12 +86,6 @@ public class AstridPreferences {
swipeEnabled = true;
}
boolean advancedEdit = ABChooser.readChoiceForTest(ABTests.AB_ADVANCED_EDIT) != 0;
if (advancedEdit && !Preferences.isSet(BeastModePreferences.BEAST_MODE_ORDER_PREF)) {
Preferences.setString(BeastModePreferences.BEAST_MODE_ORDER_PREF,
BeastModePreferences.getAdvancedEditOrderForABTest(context));
}
Preferences.setIfUnset(prefs, editor, r, R.string.p_swipe_lists_enabled, swipeEnabled);
if ("white-blue".equals(Preferences.getStringValue(R.string.p_theme))) { //$NON-NLS-1$ migrate from when white-blue wasn't the default

Loading…
Cancel
Save