[blam] ItemView: Use the Id if the Item doesn't have any links



commit ed542cdc44c71b29050afc18466b98352d892b3a
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date:   Sun Jul 22 17:53:59 2012 +0200

    ItemView: Use the Id if the Item doesn't have any links

 src/ItemView.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ItemView.cs b/src/ItemView.cs
index 7faa67c..8ba963a 100644
--- a/src/ItemView.cs
+++ b/src/ItemView.cs
@@ -116,7 +116,9 @@ namespace Imendio.Blam {
             string text = currentItem.Summary != null ? currentItem.Summary.Text
                 : currentItem.Content != null ? (currentItem.Content as TextSyndicationContent).Text : null;
             string title   = HtmlUtils.Escape(currentItem.Title.Text);
-            string url     = currentItem.Links[0].Uri.ToString();
+            string url = currentItem.Links.Count == 0 ? currentItem.Id :
+                currentItem.Links[0].Uri.ToString();
+
             baseDir        = "file://" + theme.Path;
 
             string[] replaces = {



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