[gitg] Prefetch author avatar in commit activity



commit f10258ed2838ace8be132bc6062407219efe7323
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jul 6 16:19:19 2013 +0200

    Prefetch author avatar in commit activity

 gitg/commit/gitg-commit.vala |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gitg/commit/gitg-commit.vala b/gitg/commit/gitg-commit.vala
index e65b0ec..3752791 100644
--- a/gitg/commit/gitg-commit.vala
+++ b/gitg/commit/gitg-commit.vala
@@ -54,6 +54,17 @@ namespace GitgCommit
                {
                        application.bind_property("repository", this,
                                                  "repository", BindingFlags.DEFAULT);
+
+                       // Preload author avatar
+                       try
+                       {
+                               var author = get_signature("AUTHOR");
+                               var ac = Gitg.AvatarCache.default();
+
+                               ac.load.begin(author.get_email(), null, (obj, res) => {
+                                       ac.load.end(res);
+                               });
+                       } catch {}
                }
 
                public string display_name



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]