From 1833726c10d3bfa93fab052b28f5ae8ae76c5db9 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Mon, 5 Aug 2013 12:06:39 -0500 Subject: [PATCH] Convert fields to local variables --- .../com/todoroo/astrid/actfm/TagViewFragment.java | 4 ---- .../com/todoroo/astrid/locale/LocaleEditAlerts.java | 5 +---- .../todoroo/astrid/activity/TaskListActivity.java | 5 +---- astrid/src/com/todoroo/astrid/ui/NumberPicker.java | 13 ++++--------- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java index 1f434c940..b0c6ec0a3 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/TagViewFragment.java @@ -135,8 +135,6 @@ public class TagViewFragment extends TaskListFragment { protected AtomicBoolean isBeingFiltered = new AtomicBoolean(false); - private Filter originalFilter; - protected boolean justDeleted = false; // --- UI initialization @@ -162,8 +160,6 @@ public class TagViewFragment extends TaskListFragment { if (membersEdit != null) { membersEdit.setOnClickListener(settingsListener); } - - originalFilter = filter; } private final OnClickListener settingsListener = new OnClickListener() { diff --git a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java index 2c13500fb..52db6826c 100644 --- a/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java +++ b/astrid/plugin-src/com/todoroo/astrid/locale/LocaleEditAlerts.java @@ -100,7 +100,6 @@ public final class LocaleEditAlerts extends ListActivity { * There is no need to save/restore this field's state when the {@code Activity} is paused. */ private boolean isCancelled = false; - private boolean isRemoved = false; /** * Called when the activity is first created. @@ -205,9 +204,7 @@ public final class LocaleEditAlerts extends ListActivity { */ @Override public void finish() { - if (isRemoved) { - setResult(com.twofortyfouram.Intent.RESULT_REMOVE); - } else if (isCancelled) { + if (isCancelled) { setResult(RESULT_CANCELED); } else { final FilterListItem selected = adapter.getSelection(); diff --git a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java index 6a7761a4d..2a2363a01 100644 --- a/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskListActivity.java @@ -103,7 +103,6 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener private FragmentPopover listsPopover; private MainMenuPopover mainMenuPopover; - private boolean commentsVisible = false; private boolean swipeEnabled = false; @@ -539,9 +538,7 @@ public class TaskListActivity extends AstridActivity implements MainMenuListener View taskeditFragmentContainer = findViewById(R.id.taskedit_fragment_container); if (taskeditFragmentContainer != null && taskeditFragmentContainer.getVisibility() == View.VISIBLE) { if (fragmentLayout == LAYOUT_DOUBLE) { - if (!commentsVisible) { - findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE); - } + findViewById(R.id.taskedit_fragment_container).setVisibility(View.GONE); } Flags.set(Flags.TLA_DISMISSED_FROM_TASK_EDIT); onPostResume(); diff --git a/astrid/src/com/todoroo/astrid/ui/NumberPicker.java b/astrid/src/com/todoroo/astrid/ui/NumberPicker.java index 6f0ae1e1a..bbde123c7 100644 --- a/astrid/src/com/todoroo/astrid/ui/NumberPicker.java +++ b/astrid/src/com/todoroo/astrid/ui/NumberPicker.java @@ -84,11 +84,6 @@ public class NumberPicker extends LinearLayout implements OnClickListener, private final EditText mText; private final InputFilter mNumberInputFilter; - private final Animation mSlideUpOutAnimation; - private final Animation mSlideUpInAnimation; - private final Animation mSlideDownOutAnimation; - private final Animation mSlideDownInAnimation; - private String[] mDisplayedValues; private int mStart; private int mEnd; @@ -141,19 +136,19 @@ public class NumberPicker extends LinearLayout implements OnClickListener, // disable keyboard until user requests it AndroidUtilities.suppressVirtualKeyboard(mText); - mSlideUpOutAnimation = new TranslateAnimation( + Animation mSlideUpOutAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, -100); mSlideUpOutAnimation.setDuration(200); - mSlideUpInAnimation = new TranslateAnimation( + Animation mSlideUpInAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 100, Animation.RELATIVE_TO_SELF, 0); mSlideUpInAnimation.setDuration(200); - mSlideDownOutAnimation = new TranslateAnimation( + Animation mSlideDownOutAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 100); mSlideDownOutAnimation.setDuration(200); - mSlideDownInAnimation = new TranslateAnimation( + Animation mSlideDownInAnimation = new TranslateAnimation( Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, -100, Animation.RELATIVE_TO_SELF, 0); mSlideDownInAnimation.setDuration(200);