Procházet zdrojové kódy

correctly return result

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky před 3 roky
rodič
revize
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();
 
             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);
             }
         }