From 27e108a5e4851f482f118b5a3bf7f6ba28b2987c Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Tue, 24 Apr 2012 18:00:19 -0700 Subject: [PATCH] Fixed a logic error in reporting app_open statistics --- .../com/todoroo/astrid/activity/TaskListActivity.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 4866e8d4b..342084f31 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -213,16 +213,19 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener long now = DateUtilities.now(); long timeSinceFirst = now - firstLaunchTime; - if (timeSinceFirst < DateUtilities.ONE_DAY * 3 && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_THREE_DAYS, false)) { + if (timeSinceFirst > DateUtilities.ONE_DAY * 3 && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_THREE_DAYS, false)) { StatisticsService.reportEvent(StatisticsConstants.APP_OPEN_THREE_DAYS); Preferences.setBoolean(StatisticsConstants.APP_OPEN_THREE_DAYS, true); - } else if (timeSinceFirst < DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_ONE_WEEK, false)) { + } + if (timeSinceFirst > DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_ONE_WEEK, false)) { StatisticsService.reportEvent(StatisticsConstants.APP_OPEN_ONE_WEEK); Preferences.setBoolean(StatisticsConstants.APP_OPEN_ONE_WEEK, true); - } else if (timeSinceFirst < 2 * DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_TWO_WEEKS, false)) { + } + if (timeSinceFirst > 2 * DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_TWO_WEEKS, false)) { StatisticsService.reportEvent(StatisticsConstants.APP_OPEN_TWO_WEEKS); Preferences.setBoolean(StatisticsConstants.APP_OPEN_TWO_WEEKS, true); - } else if (timeSinceFirst < 3 * DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_THREE_WEEKS, false)) { + } + if (timeSinceFirst > 3 * DateUtilities.ONE_WEEK && !Preferences.getBoolean(StatisticsConstants.APP_OPEN_THREE_WEEKS, false)) { StatisticsService.reportEvent(StatisticsConstants.APP_OPEN_THREE_WEEKS); Preferences.setBoolean(StatisticsConstants.APP_OPEN_THREE_WEEKS, true); }