mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 13:15:35 +03:00
Fix tests
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
5eb0d206a2
commit
730b06eda7
1 changed files with 6 additions and 2 deletions
|
@ -758,6 +758,10 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
return ret;
|
||||
}
|
||||
|
||||
private boolean isCurrentDirectoryRoot() {
|
||||
return currentDirectory != null && currentDirectory.isRootDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the adapted directory for a new one
|
||||
*
|
||||
|
@ -793,10 +797,10 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
|
|||
}
|
||||
|
||||
// TODO refactor add DrawerState instead of using static menuItemId
|
||||
if (DrawerActivity.menuItemId == R.id.nav_shared && currentDirectory.isRootDirectory()) {
|
||||
if (DrawerActivity.menuItemId == R.id.nav_shared && isCurrentDirectoryRoot()) {
|
||||
mFiles = filterSharedFiles(mFiles);
|
||||
}
|
||||
if (DrawerActivity.menuItemId == R.id.nav_favorites && currentDirectory.isRootDirectory()) {
|
||||
if (DrawerActivity.menuItemId == R.id.nav_favorites && isCurrentDirectoryRoot()) {
|
||||
mFiles = filterFavoriteFiles(mFiles);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue