From 61757e5d80acc76a1c67d6a5268c7a4ef7c6de4c Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Fri, 21 Oct 2016 12:06:24 -0500 Subject: [PATCH] Rename GtasksListFrag to GtasksSubtaskListFragment --- ...ksListFragment.java => GtasksSubtaskListFragment.java} | 4 ++-- .../com/todoroo/astrid/activity/TaskListActivity.java | 8 +++----- .../com/todoroo/astrid/activity/TaskListFragment.java | 8 ++++---- src/main/java/org/tasks/injection/FragmentComponent.java | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) rename src/googleplay/java/com/todoroo/astrid/gtasks/{GtasksListFragment.java => GtasksSubtaskListFragment.java} (97%) diff --git a/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksListFragment.java b/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksSubtaskListFragment.java similarity index 97% rename from src/googleplay/java/com/todoroo/astrid/gtasks/GtasksListFragment.java rename to src/googleplay/java/com/todoroo/astrid/gtasks/GtasksSubtaskListFragment.java index b0b5109af..fc61c24e2 100644 --- a/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksListFragment.java +++ b/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksSubtaskListFragment.java @@ -41,10 +41,10 @@ import java.util.Arrays; import javax.inject.Inject; -public class GtasksListFragment extends TaskListFragment { +public class GtasksSubtaskListFragment extends TaskListFragment { public static TaskListFragment newGtasksListFragment(GtasksFilter filter, GtasksList list) { - GtasksListFragment fragment = new GtasksListFragment(); + GtasksSubtaskListFragment fragment = new GtasksSubtaskListFragment(); fragment.filter = filter; fragment.list = list; return fragment; diff --git a/src/main/java/com/todoroo/astrid/activity/TaskListActivity.java b/src/main/java/com/todoroo/astrid/activity/TaskListActivity.java index 058a5e49e..64489c022 100644 --- a/src/main/java/com/todoroo/astrid/activity/TaskListActivity.java +++ b/src/main/java/com/todoroo/astrid/activity/TaskListActivity.java @@ -19,9 +19,6 @@ import android.view.View; import android.view.inputmethod.InputMethodManager; import com.todoroo.andlib.utility.AndroidUtilities; - -import org.tasks.tasklist.TagListFragment; - import com.todoroo.astrid.api.AstridApiConstants; import com.todoroo.astrid.api.Filter; import com.todoroo.astrid.api.FilterListItem; @@ -33,7 +30,7 @@ import com.todoroo.astrid.dao.TaskDao; import com.todoroo.astrid.data.TagData; import com.todoroo.astrid.data.Task; import com.todoroo.astrid.gtasks.GtasksList; -import com.todoroo.astrid.gtasks.GtasksListFragment; +import com.todoroo.astrid.gtasks.GtasksSubtaskListFragment; import com.todoroo.astrid.gtasks.GtasksListService; import com.todoroo.astrid.repeats.RepeatControlSet; import com.todoroo.astrid.service.TaskCreator; @@ -57,6 +54,7 @@ import org.tasks.intents.TaskIntents; import org.tasks.preferences.DefaultFilterProvider; import org.tasks.preferences.Preferences; import org.tasks.receivers.RepeatConfirmationReceiver; +import org.tasks.tasklist.TagListFragment; import org.tasks.themes.Theme; import org.tasks.themes.ThemeCache; import org.tasks.themes.ThemeColor; @@ -300,7 +298,7 @@ public class TaskListActivity extends InjectingAppCompatActivity implements GtasksFilter gtasksFilter = (GtasksFilter) filter; GtasksList list = gtasksListService.getList(gtasksFilter.getStoreId()); if (list != null) { - return GtasksListFragment.newGtasksListFragment(gtasksFilter, list); + return GtasksSubtaskListFragment.newGtasksListFragment(gtasksFilter, list); } } else if (filter != null) { return subtasksHelper.shouldUseSubtasksFragmentForFilter(filter) diff --git a/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java b/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java index 8a3d3582c..add486d47 100644 --- a/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java +++ b/src/main/java/com/todoroo/astrid/activity/TaskListFragment.java @@ -45,7 +45,7 @@ import com.todoroo.astrid.core.BuiltInFilterExposer; import com.todoroo.astrid.dao.TaskAttachmentDao; import com.todoroo.astrid.dao.TaskDao; import com.todoroo.astrid.data.Task; -import com.todoroo.astrid.gtasks.GtasksListFragment; +import com.todoroo.astrid.gtasks.GtasksSubtaskListFragment; import com.todoroo.astrid.gtasks.GtasksPreferenceService; import com.todoroo.astrid.service.TaskCreator; import com.todoroo.astrid.service.TaskDeleter; @@ -261,13 +261,13 @@ public class TaskListFragment extends InjectingListFragment implements if (preferences.getBoolean(R.string.p_show_completed_tasks, false)) { completed.setChecked(true); } - if (this instanceof GtasksListFragment) { + if (this instanceof GtasksSubtaskListFragment) { menu.findItem(R.id.menu_sort).setVisible(false); completed.setChecked(true); completed.setEnabled(false); } - if (this instanceof SubtasksTagListFragment || this instanceof SubtasksListFragment || this instanceof GtasksListFragment) { + if (this instanceof SubtasksTagListFragment || this instanceof SubtasksListFragment || this instanceof GtasksSubtaskListFragment) { hidden.setChecked(true); hidden.setEnabled(false); } @@ -412,7 +412,7 @@ public class TaskListFragment extends InjectingListFragment implements listView.setItemsCanFocus(false); } - if (this instanceof SubtasksListFragment || this instanceof SubtasksTagListFragment || this instanceof GtasksListFragment) { + if (this instanceof SubtasksListFragment || this instanceof SubtasksTagListFragment || this instanceof GtasksSubtaskListFragment) { return; } diff --git a/src/main/java/org/tasks/injection/FragmentComponent.java b/src/main/java/org/tasks/injection/FragmentComponent.java index cf4156932..2f134a2c3 100644 --- a/src/main/java/org/tasks/injection/FragmentComponent.java +++ b/src/main/java/org/tasks/injection/FragmentComponent.java @@ -3,7 +3,7 @@ package org.tasks.injection; import com.todoroo.astrid.activity.TaskEditFragment; import com.todoroo.astrid.activity.TaskListFragment; import com.todoroo.astrid.files.FilesControlSet; -import com.todoroo.astrid.gtasks.GtasksListFragment; +import com.todoroo.astrid.gtasks.GtasksSubtaskListFragment; import com.todoroo.astrid.repeats.RepeatControlSet; import com.todoroo.astrid.subtasks.SubtasksListFragment; import com.todoroo.astrid.subtasks.SubtasksTagListFragment; @@ -62,7 +62,7 @@ public interface FragmentComponent { void inject(TagListFragment tagListFragment); - void inject(GtasksListFragment gtasksListFragment); + void inject(GtasksSubtaskListFragment gtasksSubtaskListFragment); void inject(SubtasksListFragment subtasksListFragment);