Forráskód Böngészése

Polish landscape and turns

masensio 9 éve
szülő
commit
e9c562aa8a

+ 5 - 3
src/com/owncloud/android/ui/activity/ShareActivity.java

@@ -67,6 +67,7 @@ public class ShareActivity extends FileActivity
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
+        onAccountSet(false);
 
         setContentView(R.layout.share_activity);
 
@@ -85,7 +86,6 @@ public class ShareActivity extends FileActivity
                 if (mSearchFragment != null){
                     ft.hide(mShareFileFragment);
                     ft.add(R.id.share_fragment_container, mSearchFragment, TAG_SEARCH_FRAGMENT);
-                    ft.addToBackStack(TAG_SEARCH_FRAGMENT);
                 }
                 ft.commit();
             }
@@ -101,7 +101,7 @@ public class ShareActivity extends FileActivity
 
         handleIntent(getIntent());
 
-        onAccountSet(false);
+
     }
 
 
@@ -188,8 +188,8 @@ public class ShareActivity extends FileActivity
     public void onBackPressed() {
         super.onBackPressed();
         if (mSearchFragment != null){
-            getSupportFragmentManager().popBackStackImmediate();
             mSearchFragment = null;
+            getSupportFragmentManager().popBackStackImmediate();
             mShareFileFragment.refreshUsersOrGroupsListFromDB();
         }
     }
@@ -208,6 +208,8 @@ public class ShareActivity extends FileActivity
             refreshUsersInLists();
         } else if(operation instanceof CreateShareWithShareeOperation){
             refreshUsersInLists();
+            // Clean action
+            getIntent().setAction(null);
         }
     }