diff --git a/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java b/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java index a3b4f10d97..531fc23e9c 100644 --- a/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java +++ b/src/main/java/com/owncloud/android/ui/fragment/ExtendedListFragment.java @@ -5,16 +5,16 @@ * Copyright (C) 2017 Mario Danic * Copyright (C) 2012 Bartek Przybylski * Copyright (C) 2012-2016 ownCloud Inc. - * + *

* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. - * + *

* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + *

* You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -282,24 +282,14 @@ public class ExtendedListFragment extends Fragment } public boolean onQueryTextChange(final String query) { - if (getFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_SECOND_FRAGMENT) - instanceof ExtendedListFragment){ - performSearch(query, false); - return true; - } else { - return false; - } + performSearch(query, false); + return true; } @Override public boolean onQueryTextSubmit(String query) { - if (getFragmentManager().findFragmentByTag(FileDisplayActivity.TAG_SECOND_FRAGMENT) - instanceof ExtendedListFragment){ - performSearch(query, true); - return true; - } else { - return false; - } + performSearch(query, true); + return true; } private void performSearch(final String query, boolean isSubmit) { @@ -476,7 +466,7 @@ public class ExtendedListFragment extends Fragment * Calculates the position of the item that will be used as a reference to * reposition the visible items in the list when the device is turned to * other position. - * + *

* The current policy is take as a reference the visible item in the center * of the screen. * @@ -581,9 +571,9 @@ public class ExtendedListFragment extends Fragment /** * Disables swipe gesture. - * + *

* Sets the 'enabled' state of the refresh layouts contained in the fragment. - * + *

* When 'false' is set, prevents user gestures but keeps the option to refresh programatically, * * @param enabled Desired state for capturing swipe gesture. @@ -596,7 +586,7 @@ public class ExtendedListFragment extends Fragment /** * Sets the 'visibility' state of the FAB contained in the fragment. - * + *

* When 'false' is set, FAB visibility is set to View.GONE programmatically, * * @param enabled Desired visibility for the FAB.