Browse Source

restore backAsUp arrow in action bar when being in a subfolder (and drawer has been opened/closed) #445

AndyScherzinger 8 years ago
parent
commit
4d646d0da3

+ 5 - 0
src/com/owncloud/android/ui/activity/DrawerActivity.java

@@ -198,6 +198,7 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
                     toggleAccountList();
                 }
                 invalidateOptionsMenu();
+                mDrawerToggle.setDrawerIndicatorEnabled(isDrawerIndicatorAvailable());
 
                 if (pendingRunnable != null) {
                     new Handler().post(pendingRunnable);
@@ -837,4 +838,8 @@ public abstract class DrawerActivity extends ToolbarActivity implements DisplayU
             Log_OC.e(TAG, "Drawer layout not ready to add drawer listener");
         }
     }
+
+    public boolean isDrawerIndicatorAvailable() {
+        return true;
+    }
 }

+ 5 - 0
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -1328,6 +1328,11 @@ public class FileDisplayActivity extends HookActivity
 
     }
 
+    @Override
+    public boolean isDrawerIndicatorAvailable() {
+        return isRoot(getCurrentDir());
+    }
+
     @Override
     protected ServiceConnection newTransferenceServiceConnection() {
         return new ListServiceConnection();