Эх сурвалжийг харах

rename functions

Signed-off-by: alperozturk <alper_ozturk@proton.me>
alperozturk 8 сар өмнө
parent
commit
fbb7317664

+ 6 - 6
app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -916,7 +916,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
         }
         }
     }
     }
 
 
-    private boolean shouldNavigateNormally(OCFile topParent) {
+    private boolean shouldNavigateWithoutFilter(OCFile topParent) {
         int menuItemId = DrawerActivity.menuItemId;
         int menuItemId = DrawerActivity.menuItemId;
         return (menuItemId != R.id.nav_shared && menuItemId != R.id.nav_favorites) ||
         return (menuItemId != R.id.nav_shared && menuItemId != R.id.nav_favorites) ||
             (menuItemId == R.id.nav_shared && topParent != null && topParent.isShared()) ||
             (menuItemId == R.id.nav_shared && topParent != null && topParent.isShared()) ||
@@ -928,7 +928,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
         return menuItemId == R.id.nav_shared || menuItemId == R.id.nav_favorites;
         return menuItemId == R.id.nav_shared || menuItemId == R.id.nav_favorites;
     }
     }
 
 
-    private Pair<Integer, OCFile> navigateNormally(FileDataStorageManager storageManager) {
+    private Pair<Integer, OCFile> getPreviousFileWithoutFilter(FileDataStorageManager storageManager) {
         int moveCount = 0;
         int moveCount = 0;
         OCFile parentDir = null;
         OCFile parentDir = null;
         String parentPath = null;
         String parentPath = null;
@@ -959,7 +959,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
         return new Pair<>(moveCount, parentDir);
         return new Pair<>(moveCount, parentDir);
     }
     }
 
 
-    private OCFile navigateWithFilter(FileDataStorageManager storageManager, OCFile currentFile) {
+    private OCFile getPreviousFileWithFilter(FileDataStorageManager storageManager, OCFile currentFile) {
         while (true) {
         while (true) {
             OCFile parent = storageManager.getFileById(currentFile.getParentId());
             OCFile parent = storageManager.getFileById(currentFile.getParentId());
             if (parent == null) {
             if (parent == null) {
@@ -997,12 +997,12 @@ public class OCFileListFragment extends ExtendedListFragment implements
         OCFile topParent = storageManager.getTopParent(currentFile);
         OCFile topParent = storageManager.getTopParent(currentFile);
         int moveCount = 0;
         int moveCount = 0;
 
 
-        if (shouldNavigateNormally(topParent)) {
-            var result = navigateNormally(storageManager);
+        if (shouldNavigateWithoutFilter(topParent)) {
+            var result = getPreviousFileWithoutFilter(storageManager);
             moveCount = result.first;
             moveCount = result.first;
             mFile = result.second;
             mFile = result.second;
         } else if (shouldNavigateWithFilter()) {
         } else if (shouldNavigateWithFilter()) {
-            mFile = navigateWithFilter(storageManager, currentFile);
+            mFile = getPreviousFileWithFilter(storageManager, currentFile);
         }
         }
 
 
         updateFileList();
         updateFileList();