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

Grant that the content of the previous adapter is updated with rotations

masensio 11 жил өмнө
parent
commit
9820893fd9

+ 1 - 1
src/com/owncloud/android/providers/FileContentProvider.java

@@ -484,7 +484,7 @@ public class FileContentProvider extends ContentProvider {
         }
         getContext().getContentResolver().notifyChange(uri, null);
         
-     // Get parentId to notify the change
+        // Get parentId to notify the change
         long parentId = getParentId(uri);
         // Notify the change to the parent folder
         notifyChangeToParentUri(parentId);

+ 3 - 1
src/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -132,7 +132,7 @@ public class OCFileListFragment extends ExtendedListFragment
             mIndexes = savedInstanceState.getIntegerArrayList(KEY_INDEXES);
             mFirstPositions = savedInstanceState.getIntegerArrayList(KEY_FIRST_POSITIONS);
             mTops = savedInstanceState.getIntegerArrayList(KEY_TOPS);
-            mHeightCell = savedInstanceState.getInt(KEY_HEIGHT_CELL);
+            onCreateLoader(LOADER_ID, null);
             
         } else {
             mIndexes = new ArrayList<Integer>();
@@ -166,6 +166,7 @@ public class OCFileListFragment extends ExtendedListFragment
         outState.putIntegerArrayList(KEY_FIRST_POSITIONS, mFirstPositions);
         outState.putIntegerArrayList(KEY_TOPS, mTops);
         outState.putInt(KEY_HEIGHT_CELL, mHeightCell);
+        
     }
     
     /**
@@ -572,6 +573,7 @@ public class OCFileListFragment extends ExtendedListFragment
         if (storageManager != null) {
             mAdapter.setStorageManager(storageManager);
             mCursorLoader.setParentId(parentId);
+            mCursorLoader.setStorageManager(storageManager);
             newCursor = mCursorLoader.loadInBackground();//storageManager.getContent(folder.getFileId());
             Uri uri = Uri.withAppendedPath(
                     ProviderTableMeta.CONTENT_URI_DIR,