mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 23:11:58 +03:00
revert check for specific fragment while search, as contactBackup does not have a search
This commit is contained in:
parent
9f7cd59682
commit
a304f1b0a0
1 changed files with 11 additions and 21 deletions
|
@ -5,16 +5,16 @@
|
|||
* Copyright (C) 2017 Mario Danic
|
||||
* Copyright (C) 2012 Bartek Przybylski
|
||||
* Copyright (C) 2012-2016 ownCloud Inc.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -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.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* Sets the 'enabled' state of the refresh layouts contained in the fragment.
|
||||
*
|
||||
* <p>
|
||||
* 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.
|
||||
*
|
||||
* <p>
|
||||
* When 'false' is set, FAB visibility is set to View.GONE programmatically,
|
||||
*
|
||||
* @param enabled Desired visibility for the FAB.
|
||||
|
|
Loading…
Reference in a new issue