mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Fix arrow stuff
This commit is contained in:
parent
6b4a94b5ca
commit
0fd9a47b23
4 changed files with 33 additions and 6 deletions
|
@ -507,8 +507,10 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
|
|||
super.updateActionBarTitleAndHomeButton(chosenFile);
|
||||
|
||||
/// set home button properties
|
||||
if (mDrawerToggle != null) {
|
||||
if (mDrawerToggle != null && chosenFile != null) {
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(isRoot(chosenFile));
|
||||
} else {
|
||||
mDrawerToggle.setDrawerIndicatorEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -633,8 +633,20 @@ public class FileDisplayActivity extends HookActivity
|
|||
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
|
||||
@Override
|
||||
public boolean onClose() {
|
||||
setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
|
||||
return false;
|
||||
if (TextUtils.isEmpty(searchView.getQuery().toString())) {
|
||||
searchView.onActionViewCollapsed();
|
||||
setDrawerIndicatorEnabled(isDrawerIndicatorAvailable()); // order matters
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
mDrawerToggle.syncState();
|
||||
} else {
|
||||
searchView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
searchView.setQuery("", true);
|
||||
}
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -650,8 +662,6 @@ public class FileDisplayActivity extends HookActivity
|
|||
if (currentVisibility != oldVisibility) {
|
||||
if (currentVisibility == View.VISIBLE) {
|
||||
setDrawerIndicatorEnabled(false);
|
||||
} else {
|
||||
setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
|
||||
}
|
||||
|
||||
oldVisibility = currentVisibility;
|
||||
|
|
|
@ -288,7 +288,7 @@ public class ExtendedListFragment extends Fragment
|
|||
mRefreshListLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_list);
|
||||
mRefreshGridLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_grid);
|
||||
mRefreshEmptyLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_containing_empty);
|
||||
|
||||
|
||||
onCreateSwipeToRefresh(mRefreshListLayout);
|
||||
onCreateSwipeToRefresh(mRefreshGridLayout);
|
||||
onCreateSwipeToRefresh(mRefreshEmptyLayout);
|
||||
|
@ -450,6 +450,11 @@ public class ExtendedListFragment extends Fragment
|
|||
|
||||
if (searchView != null) {
|
||||
searchView.onActionViewCollapsed();
|
||||
|
||||
if (getActivity() != null) {
|
||||
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity();
|
||||
fileDisplayActivity.setDrawerIndicatorEnabled(fileDisplayActivity.isDrawerIndicatorAvailable());
|
||||
}
|
||||
}
|
||||
|
||||
mRefreshListLayout.setRefreshing(false);
|
||||
|
|
|
@ -787,11 +787,21 @@ public class OCFileListFragment extends ExtendedListFragment implements Extended
|
|||
directory = storageManager.getFileById(directory.getParentId());
|
||||
}
|
||||
|
||||
|
||||
if (searchView != null && !searchView.isIconified() && !fromSearch) {
|
||||
|
||||
searchView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
searchView.setQuery("", false);
|
||||
searchView.onActionViewCollapsed();
|
||||
if (getActivity() != null) {
|
||||
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity();
|
||||
if (getCurrentFile() != null) {
|
||||
fileDisplayActivity.setDrawerIndicatorEnabled(fileDisplayActivity.isRoot(getCurrentFile()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue