[gnome-photos/gnome-3-16] base-item: Avoid redundant SPARQL queries and info-updated emissions
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-16] base-item: Avoid redundant SPARQL queries and info-updated emissions
- Date: Fri, 30 Oct 2015 10:32:51 +0000 (UTC)
commit edfb934b08f580399324801a61f75da9f56940d3
Author: Alessandro Bono <shadow openaliasbox org>
Date: Fri Oct 30 10:35:50 2015 +0100
base-item: Avoid redundant SPARQL queries and info-updated emissions
https://bugzilla.gnome.org/show_bug.cgi?id=757015
src/photos-base-item.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 8116cfd..ca5825e 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -406,6 +406,9 @@ photos_base_item_default_set_favorite (PhotosBaseItem *self, gboolean favorite)
{
PhotosBaseItemPrivate *priv = self->priv;
+ if (favorite == priv->favorite)
+ return;
+
priv->favorite = favorite;
photos_base_item_check_effects_and_update_info (self);
photos_utils_set_favorite (priv->id, favorite);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]