[gnome-photos] 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] base-item: Avoid redundant SPARQL queries and info-updated emissions
- Date: Fri, 30 Oct 2015 10:22:26 +0000 (UTC)
commit a42d392005e022b0c64027b8d008c9dd136182ed
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 104cf3c..2a5e7fd 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]