Archived
1
0

Development 7

This commit is contained in:
Michael Gordeev
2018-07-22 15:00:47 +03:00
parent 57c90f4037
commit 0338d8a626
24 changed files with 727 additions and 359 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ namespace FoxTube.Background
{
public static event NotificationHandler NotificationRecieved;
public List<Notification> Notifications = new List<Notification>();
List<Notification> Notifications = new List<Notification>();
private DateTime lastCheck = DateTime.Now;
private ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
@@ -124,7 +124,7 @@ namespace FoxTube.Background
doc["posts"].FirstChild["content"].InnerText,
XmlConvert.ToDateTime((doc["posts"].FirstChild as XmlElement).GetAttribute("time"),
XmlDateTimeSerializationMode.Unspecified),
(doc["posts"].FirstChild as XmlElement).GetAttribute("image")));
(doc["posts"].FirstChild as XmlElement).GetAttribute("image"), null));
return doc.InnerXml;
}
+5 -5
View File
@@ -18,25 +18,25 @@ namespace FoxTube.Background
Video, Comment, Post, Internal
}
public class Notification
public sealed class Notification
{
public string Channel { get; set; }
public string Content { get; set; }
public DateTime TimeStamp { get; set; }
public DateTimeOffset TimeStamp { get; set; }
public NotificationType Type { get; set; }
public string Avatar { get; set; }
public string Thumbnail { get; set; }
public string Id { get; set; }
public Notification(string type, string id,
string channelName, string content, DateTime date,
string thumbnailUrl, string avatarUrl = "ms-appx:///Assets/Icons/Profile.png")
string channelName, string content, DateTimeOffset date,
string thumbnailUrl, string avatarUrl)
{
Channel = channelName;
Content = content;
TimeStamp = date;
Type = TypeConversion(type);
Avatar = avatarUrl;
Avatar = avatarUrl == null? "ms-appx:///Assets/Icons/Profile.png" : avatarUrl;
Thumbnail = thumbnailUrl;
}