[gnome-photos/gnome-3-16] view-model: Don't keep it alive just for the timeout
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/gnome-3-16] view-model: Don't keep it alive just for the timeout
- Date: Thu, 29 Oct 2015 01:53:58 +0000 (UTC)
commit 87189a1f37a9a067a264af8f49a9762c6ee3f8d0
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Oct 29 01:18:36 2015 +0100
view-model: Don't keep it alive just for the timeout
The whole point of updating the OffsetController's count is to ensure
that we can load more items and show the "No Results" page. If the
ViewModel is about to be destroyed, then the ViewContainer is also
gone, and the count is useless without a view. So we might as well
spare ourselves a needless query.
https://bugzilla.gnome.org/show_bug.cgi?id=757199
src/photos-view-model.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/photos-view-model.c b/src/photos-view-model.c
index 2de9f91..68db13f 100644
--- a/src/photos-view-model.c
+++ b/src/photos-view-model.c
@@ -107,11 +107,7 @@ photos_view_model_reset_count (PhotosViewModel *self)
PhotosViewModelPrivate *priv = self->priv;
if (priv->reset_count_id == 0)
- priv->reset_count_id = g_timeout_add_full (G_PRIORITY_DEFAULT,
- RESET_COUNT_TIMEOUT,
- photos_view_model_reset_count_timeout,
- g_object_ref (self),
- g_object_unref);
+ priv->reset_count_id = g_timeout_add (RESET_COUNT_TIMEOUT, photos_view_model_reset_count_timeout, self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]