Browse Source

Allowed onbackpressed from properties (without redisplaying file) + Removed useless intent data

Kilian Périsset 5 years ago
parent
commit
65b82c2ee5

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

@@ -1162,13 +1162,6 @@ public class FileDisplayActivity extends FileActivity
         } else {
             // all closed
 
-            //if PreviewImageActivity called this activity and mDualPane==false  then calls PreviewImageActivity again
-            if (ACTION_DETAILS.equalsIgnoreCase(getIntent().getAction()) && !mDualPane) {
-                getIntent().setAction(null);
-                getIntent().putExtra(EXTRA_FILE, (OCFile) null);
-                startImagePreview(getFile(), false);
-            }
-
             OCFileListFragment listOfFiles = getListOfFilesFragment();
             if (mDualPane || getSecondFragment() == null) {
                 OCFile currentDir = getCurrentDir();

+ 1 - 3
src/main/java/com/owncloud/android/ui/preview/PreviewImageActivity.java

@@ -386,12 +386,10 @@ public class PreviewImageActivity extends FileActivity implements
     @SuppressFBWarnings("DLS")
     @Override
     public void showDetails(OCFile file) {
-        final User currentUser = getUserAccountManager().getUser();
         final Intent showDetailsIntent = new Intent(this, FileDisplayActivity.class);
         showDetailsIntent.setAction(FileDisplayActivity.ACTION_DETAILS);
         showDetailsIntent.putExtra(FileActivity.EXTRA_FILE, file);
-        showDetailsIntent.putExtra(FileActivity.EXTRA_ACCOUNT, currentUser.toPlatformAccount());
-        showDetailsIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        showDetailsIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
         startActivity(showDetailsIntent);
         finish();
     }