From: masensio Date: Mon, 5 May 2014 08:44:43 +0000 (+0200) Subject: Grant that the content of the previous adapter is updated with rotations X-Git-Tag: oc-android-1.7.0_signed~309^2~57^2~1 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/9820893fd91b627fe51b4f61f3b9ebe8dc783a3c Grant that the content of the previous adapter is updated with rotations --- 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,