diff --git a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java index 89e49a1b1..9fd36a001 100755 --- a/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/app/src/main/java/com/todoroo/astrid/activity/TaskEditFragment.java @@ -36,10 +36,8 @@ import com.todoroo.astrid.repeats.RepeatControlSet; import com.todoroo.astrid.service.TaskDeleter; import com.todoroo.astrid.timers.TimerPlugin; import com.todoroo.astrid.ui.EditTitleControlSet; -import com.todoroo.astrid.utility.Flags; import java.util.List; import javax.inject.Inject; -import org.tasks.LocalBroadcastManager; import org.tasks.R; import org.tasks.analytics.Tracker; import org.tasks.data.UserActivity; @@ -71,7 +69,6 @@ public final class TaskEditFragment extends InjectingFragment @Inject Preferences preferences; @Inject Tracker tracker; @Inject TimerPlugin timerPlugin; - @Inject LocalBroadcastManager localBroadcastManager; @BindView(R.id.toolbar) Toolbar toolbar; @@ -216,10 +213,6 @@ public final class TaskEditFragment extends InjectingFragment } taskDao.save(model, null); - if (Flags.checkAndClear(Flags.TAGS_CHANGED)) { - localBroadcastManager.broadcastRefreshList(); - } - if (isNewTask) { ((MainActivity) getActivity()).getTaskListFragment().onTaskCreated(model.getUuid()); } else { diff --git a/app/src/main/java/com/todoroo/astrid/tags/TagsControlSet.java b/app/src/main/java/com/todoroo/astrid/tags/TagsControlSet.java index e1ff6d67c..0a696f2ce 100644 --- a/app/src/main/java/com/todoroo/astrid/tags/TagsControlSet.java +++ b/app/src/main/java/com/todoroo/astrid/tags/TagsControlSet.java @@ -176,7 +176,6 @@ public final class TagsControlSet extends TaskEditControlFragment { @Override public void apply(Task task) { if (synchronizeTags(task)) { - Flags.set(Flags.TAGS_CHANGED); task.setModificationDate(DateUtilities.now()); } } diff --git a/app/src/main/java/com/todoroo/astrid/utility/Flags.java b/app/src/main/java/com/todoroo/astrid/utility/Flags.java index b533462bf..e2017fef1 100644 --- a/app/src/main/java/com/todoroo/astrid/utility/Flags.java +++ b/app/src/main/java/com/todoroo/astrid/utility/Flags.java @@ -8,17 +8,13 @@ package com.todoroo.astrid.utility; public class Flags { - /** If set, indicates tags changed during task save */ - public static final int TAGS_CHANGED = 1 << 1; /** If set, indicates that TaskListFragmentPager should not intercept touch events */ public static final int TLFP_NO_INTERCEPT_TOUCH = 1 << 7; private static int state = 0; - public static boolean checkAndClear(int flag) { - boolean set = (state & flag) > 0; + public static void clear(int flag) { state &= ~flag; - return set; } public static boolean check(int flag) { diff --git a/app/src/main/java/org/tasks/tasklist/DragAndDropRecyclerAdapter.java b/app/src/main/java/org/tasks/tasklist/DragAndDropRecyclerAdapter.java index 984e7418c..1fa4182da 100644 --- a/app/src/main/java/org/tasks/tasklist/DragAndDropRecyclerAdapter.java +++ b/app/src/main/java/org/tasks/tasklist/DragAndDropRecyclerAdapter.java @@ -251,7 +251,7 @@ public class DragAndDropRecyclerAdapter extends TaskListRecyclerAdapter { } from = -1; to = -1; - Flags.checkAndClear(Flags.TLFP_NO_INTERCEPT_TOUCH); + Flags.clear(Flags.TLFP_NO_INTERCEPT_TOUCH); } @Override