[gnome-photos] fetch-collections-job: Move some code around
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] fetch-collections-job: Move some code around
- Date: Tue, 19 Apr 2016 14:56:27 +0000 (UTC)
commit b7e79f23bb91b36875e6feb5c077bb67d877fcf3
Author: Rafael Fonseca <r4f4rfs gmail com>
Date: Thu Apr 14 15:55:12 2016 +0200
fetch-collections-job: Move some code around
https://bugzilla.gnome.org/show_bug.cgi?id=764086
src/photos-fetch-collections-job.c | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/photos-fetch-collections-job.c b/src/photos-fetch-collections-job.c
index fb8164e..f67f438 100644
--- a/src/photos-fetch-collections-job.c
+++ b/src/photos-fetch-collections-job.c
@@ -78,7 +78,6 @@ photos_fetch_collections_job_cursor_next (GObject *source_object, GAsyncResult *
TrackerSparqlCursor *cursor = TRACKER_SPARQL_CURSOR (source_object);
GError *error;
gboolean valid;
- gchar *urn;
error = NULL;
valid = tracker_sparql_cursor_next_finish (cursor, res, &error);
@@ -88,17 +87,20 @@ photos_fetch_collections_job_cursor_next (GObject *source_object, GAsyncResult *
g_error_free (error);
goto end;
}
- if (!valid)
- goto end;
- urn = g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL));
- self->collections = g_list_prepend (self->collections, urn);
+ if (valid)
+ {
+ gchar *urn;
- tracker_sparql_cursor_next_async (cursor,
- NULL,
- photos_fetch_collections_job_cursor_next,
- self);
- return;
+ urn = g_strdup (tracker_sparql_cursor_get_string (cursor, 0, NULL));
+ self->collections = g_list_prepend (self->collections, urn);
+
+ tracker_sparql_cursor_next_async (cursor,
+ NULL,
+ photos_fetch_collections_job_cursor_next,
+ self);
+ return;
+ }
end:
self->collections = g_list_reverse (self->collections);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]