summaryrefslogtreecommitdiff
path: root/Juick/ViewModels/PostItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/ViewModels/PostItem.cs')
-rw-r--r--Juick/ViewModels/PostItem.cs20
1 files changed, 10 insertions, 10 deletions
diff --git a/Juick/ViewModels/PostItem.cs b/Juick/ViewModels/PostItem.cs
index 7e30a43..2072cf5 100644
--- a/Juick/ViewModels/PostItem.cs
+++ b/Juick/ViewModels/PostItem.cs
@@ -8,23 +8,24 @@ namespace Juick.ViewModels
{
public class PostItem
{
- public PostItem()
- {
-
- }
-
public PostItem(Message message)
{
MID = message.Mid;
- MessageUri = string.Format("/ThreadView.xaml?mid={0}", MID);
RID = message.Rid;
Username = message.User.UName;
+ Status = string.Format("Posted on: {0}, replies: {1}", message.Timestamp, message.Replies);
+
MessageText = HttpUtility.HtmlDecode(message.Body);
if (message.Tags != null)
{
MessageText = string.Join(", ", message.Tags) + Environment.NewLine + MessageText;
}
+ AvatarUri = new Uri(string.Format("http://i.juick.com/as/{0}.png", message.User.Uid), UriKind.Absolute);
+ if (message.Photo != null)
+ {
+ Attachment = new Uri(message.Photo.Small, UriKind.Absolute);
+ }
}
public int MID {get;set;}
@@ -36,11 +37,10 @@ namespace Juick.ViewModels
public Uri AvatarUri {get;set;}
public Uri Attachment {get;set;}
-
- public string MessageText {get;set;}
+
public string Status {get;set;}
-
- public string MessageUri {get;set;}
+
+ public string MessageText { get; set; }
}
} \ No newline at end of file