diff options
author | Jérémie Laval <jeremie.laval@gmail.com> | 2013-05-09 00:52:43 +0400 |
---|---|---|
committer | Jérémie Laval <jeremie.laval@gmail.com> | 2013-05-09 00:52:43 +0400 |
commit | 327532f92ad7f6c9ea74894d071b91f1d67748f0 (patch) | |
tree | 47d124cea4d049a414ac1dee6c28cfe8e8674be2 | |
parent | 0b0a3e56102f4e26bfa3dc43f5ce1765ee305b3c (diff) |
[macdoc] Use the same item selection flawed logic than apple-doc-wizard
Both sides were doing <item /> selection incorrectly by simply getting, respectively, the first and the last item. To be accurate, we need to sort them according to the <updated /> field.
To stay compatible with the released version of XamMac and Xam.iOS, simply reuse their style.
-rw-r--r-- | AppleDocHandler.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AppleDocHandler.cs b/AppleDocHandler.cs index a034bc1..4917cb2 100644 --- a/AppleDocHandler.cs +++ b/AppleDocHandler.cs @@ -58,7 +58,7 @@ namespace macdoc // This method transforms the Atom XML data into a POCO for the the most recent item of the feed AppleDocInformation GetLatestAppleDocInformation (XDocument feed) { - var latestEntry = feed.Descendants (atomNamespace + "entry").LastOrDefault (); + var latestEntry = feed.Descendants (atomNamespace + "entry").FirstOrDefault (); if (latestEntry == null) return null; |