From 939ce1b0bcd1ded7e1dc8c36eb89dcd4d891bd12 Mon Sep 17 00:00:00 2001 From: Paul Westbrook Date: Wed, 24 Oct 2012 08:22:18 -0700 Subject: Restart loader on attachment cursor updates cherry-pick of https://googleplex-android-review.googlesource.com/#/c/245483/ Bug: 7403076 Change-Id: I620403db9f7304e99ca4e9c0c58a439e277225d0 --- .../src/com/android/ex/photo/fragments/PhotoViewFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java index 2e99bd8..2ecbeb7 100644 --- a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java +++ b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java @@ -272,7 +272,7 @@ public class PhotoViewFragment extends Fragment implements } break; case LOADER_ID_THUMBNAIL: - if (isPhotoBound()) { + if (isPhotoBound()) { // There is need to do anything with the thumbnail image, as the full size // image is being shown. mPhotoPreviewAndProgress.setVisibility(View.GONE); @@ -346,6 +346,10 @@ public class PhotoViewFragment extends Fragment implements // we're not in the foreground; reset our view resetViews(); } else { + if (!isPhotoBound()) { + // Restart the loader + getLoaderManager().restartLoader(LOADER_ID_THUMBNAIL, null, this); + } mCallback.onFragmentVisible(this); } } -- cgit v1.2.3