From f80ebaa0c92203c2019885fb7aaa3a6832e018e9 Mon Sep 17 00:00:00 2001 From: Tim Su Date: Tue, 24 Jan 2012 21:06:22 -0800 Subject: [PATCH] Fix for first_task and first_list metrics not being reported --- astrid/src/com/todoroo/astrid/dao/MetadataDao.java | 2 +- astrid/src/com/todoroo/astrid/dao/TaskDao.java | 4 ++-- astrid/src/com/todoroo/astrid/utility/AstridPreferences.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/dao/MetadataDao.java b/astrid/src/com/todoroo/astrid/dao/MetadataDao.java index bd0bd301c..778187966 100644 --- a/astrid/src/com/todoroo/astrid/dao/MetadataDao.java +++ b/astrid/src/com/todoroo/astrid/dao/MetadataDao.java @@ -73,7 +73,7 @@ public class MetadataDao extends DatabaseDao { item.setValue(Metadata.CREATION_DATE, DateUtilities.now()); boolean state = super.persist(item); - if(Preferences.getBoolean(AstridPreferences.P_FIRST_LIST, false)) { + if(Preferences.getBoolean(AstridPreferences.P_FIRST_LIST, true)) { if (state && item.getValue(Metadata.KEY).equals(TagService.KEY)) { StatisticsService.reportEvent(StatisticsConstants.USER_FIRST_LIST); Preferences.setBoolean(AstridPreferences.P_FIRST_LIST, false); diff --git a/astrid/src/com/todoroo/astrid/dao/TaskDao.java b/astrid/src/com/todoroo/astrid/dao/TaskDao.java index b6faa8b43..efe51afc3 100644 --- a/astrid/src/com/todoroo/astrid/dao/TaskDao.java +++ b/astrid/src/com/todoroo/astrid/dao/TaskDao.java @@ -207,9 +207,9 @@ public class TaskDao extends DatabaseDao { } private void userRetentionMetrics() { - if(Preferences.getBoolean(AstridPreferences.P_FIRST_ACTION, false)) { + if(Preferences.getBoolean(AstridPreferences.P_FIRST_TASK, true)) { StatisticsService.reportEvent(StatisticsConstants.USER_FIRST_TASK); - Preferences.setBoolean(AstridPreferences.P_FIRST_ACTION, false); + Preferences.setBoolean(AstridPreferences.P_FIRST_TASK, false); } long firstLaunchTime = Preferences.getLong(AstridPreferences.P_FIRST_LAUNCH, 0); diff --git a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java index d5f8c533b..b2631ae79 100644 --- a/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java +++ b/astrid/src/com/todoroo/astrid/utility/AstridPreferences.java @@ -15,7 +15,7 @@ public class AstridPreferences { private static final String P_CURRENT_VERSION = "cv"; //$NON-NLS-1$ - public static final String P_FIRST_ACTION = "fa"; //$NON-NLS-1$ + public static final String P_FIRST_TASK = "ft"; //$NON-NLS-1$ public static final String P_FIRST_LIST = "fl"; //$NON-NLS-1$