Browse Source

correctly return result

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 3 years ago
parent
commit
256656af5d

+ 2 - 3
src/main/java/com/owncloud/android/ui/asynctasks/GallerySearchTask.java

@@ -121,10 +121,9 @@ public class GallerySearchTask extends AsyncTask<Void, Void, GallerySearchTask.R
             GalleryFragment photoFragment = photoFragmentWeakReference.get();
             GalleryFragment photoFragment = photoFragmentWeakReference.get();
 
 
             photoFragment.setLoading(false);
             photoFragment.setLoading(false);
+            photoFragment.searchCompleted(result.emptySearch, result.lastTimestamp);
 
 
-            if (result.success) {
-                photoFragment.searchCompleted(result.emptySearch, result.lastTimestamp);
-            } else {
+            if (!result.success) {
                 photoFragment.setEmptyListMessage(ExtendedListFragment.SearchType.GALLERY_SEARCH);
                 photoFragment.setEmptyListMessage(ExtendedListFragment.SearchType.GALLERY_SEARCH);
             }
             }
         }
         }