[gnome-photos/gnome-3-18] 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-18] view-model: Don't keep it alive just for the timeout
- Date: Thu, 29 Oct 2015 01:50:23 +0000 (UTC)
commit 1bac6d65e06e3411adace51358b93dc572322e91
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 448e7fb..44bca6b 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]