diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java index be3d28942..737543d4b 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java @@ -236,6 +236,11 @@ public class TagViewFragment extends TaskListFragment { updateCommentCount(); } + @Override + public void requestCommentCountUpdate() { + updateCommentCount(); + } + private void updateCommentCount() { if (tagData != null) { long lastViewedComments = Preferences.getLong(TagUpdatesFragment.UPDATES_LAST_VIEWED + tagData.getValue(TagData.REMOTE_ID), 0); diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index f1b62f09b..df9c45b4b 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -404,7 +404,10 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener if (tlfPagerAdapter != null) { configureIntentAndExtrasWithFilter(getIntent(), tlfPagerAdapter.getFilter(position)); setListsTitle(tlfPagerAdapter.getPageTitle(position).toString()); - getTaskListFragment().initiateAutomaticSync(); + + TaskListFragment fragment = getTaskListFragment(); + fragment.initiateAutomaticSync(); + fragment.requestCommentCountUpdate(); } } diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java index 43cadcc8d..b2eaba82e 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListFragment.java @@ -597,6 +597,13 @@ public class TaskListFragment extends ListFragment implements OnScrollListener, syncActionHelper.initiateAutomaticSync(filter); } + // Subclasses should override this + public void requestCommentCountUpdate() { + TaskListActivity activity = (TaskListActivity) getActivity(); + if (activity != null) + activity.setCommentsCount(0); + } + @Override public void onPause() { super.onPause();