From 9820893fd91b627fe51b4f61f3b9ebe8dc783a3c Mon Sep 17 00:00:00 2001 From: masensio Date: Mon, 5 May 2014 10:44:43 +0200 Subject: [PATCH] Grant that the content of the previous adapter is updated with rotations --- src/com/owncloud/android/providers/FileContentProvider.java | 2 +- src/com/owncloud/android/ui/fragment/OCFileListFragment.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/com/owncloud/android/providers/FileContentProvider.java b/src/com/owncloud/android/providers/FileContentProvider.java index f76ae94b..fc038070 100644 --- a/src/com/owncloud/android/providers/FileContentProvider.java +++ b/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); diff --git a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java b/src/com/owncloud/android/ui/fragment/OCFileListFragment.java index d6e2e163..58359c11 100644 --- a/src/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/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(); @@ -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, -- 2.11.0