diff --git a/FoxTube.Background/Notification.cs b/FoxTube.Background/Notification.cs index 8d3bebe..14521f2 100644 --- a/FoxTube.Background/Notification.cs +++ b/FoxTube.Background/Notification.cs @@ -9,7 +9,7 @@ namespace FoxTube.Background { XmlDocument template = new XmlDocument(); - template.LoadXml($@" + template.LoadXml($@" @@ -38,8 +38,8 @@ namespace FoxTube.Background - - + + "); diff --git a/FoxTube/Classes/InboxItem.cs b/FoxTube/Classes/InboxItem.cs index 842d370..7eaaa48 100644 --- a/FoxTube/Classes/InboxItem.cs +++ b/FoxTube/Classes/InboxItem.cs @@ -9,8 +9,7 @@ namespace FoxTube.Classes { public InboxItemType Type { get; set; } = InboxItemType.Default; public DateTime TimeStamp { get; set; } - - public string PatchVersion { get; set; } + public string Subject { get; set; } public string Content { get; set; } public string Id { get; set; } @@ -41,20 +40,19 @@ namespace FoxTube.Classes get { if (Type == InboxItemType.PatchNote) - return $"What's new in v{PatchVersion}"; + return $"What's new in v{Id}"; else return Subject; } } - public InboxItem(string version, string content, string timeStamp, string id) + public InboxItem(string version, string content, string timeStamp) { Type = InboxItemType.PatchNote; - PatchVersion = version; Content = content; TimeStamp = DateTime.Parse(timeStamp); - Id = id; + Id = version; } public InboxItem(string title, string content, DateTime timeStamp, string id) diff --git a/FoxTube/Pages/MainPage.xaml.cs b/FoxTube/Pages/MainPage.xaml.cs index c0485e1..842fe78 100644 --- a/FoxTube/Pages/MainPage.xaml.cs +++ b/FoxTube/Pages/MainPage.xaml.cs @@ -74,7 +74,7 @@ namespace FoxTube if (settings.Values["ver"] == null) settings.Values.Add("ver", $"{ver.Major}.{ver.Minor}"); - if((string)settings.Values["ver"] == $"{ver.Major}.{ver.Minor}") //Replace for '!=' !!! + //if((string)settings.Values["ver"] != $"{ver.Major}.{ver.Minor}") { try { diff --git a/FoxTube/Pages/Settings.xaml.cs b/FoxTube/Pages/Settings.xaml.cs index 613ef5b..9155168 100644 --- a/FoxTube/Pages/Settings.xaml.cs +++ b/FoxTube/Pages/Settings.xaml.cs @@ -38,21 +38,21 @@ namespace FoxTube base.OnNavigatedTo(e); if(!string.IsNullOrWhiteSpace(e.Parameter as string)) { - if ((e.Parameter as string).Contains("inbox")) + if ((e.Parameter as string).Contains("inbox") || (e.Parameter as string).Contains("changelog")) { - pivot.SelectedIndex = 3; - if ((string)e.Parameter != "inbox") - ((pivot.SelectedItem as PivotItem).Content as Inbox).Open((e.Parameter as string).Split('&')[1]); + pivot.SelectedIndex = 2; + if ((string)e.Parameter != "inbox" && (string)e.Parameter != "changelog") + ((pivot.SelectedItem as PivotItem).Content as Inbox).Open(e.Parameter as string); } else switch(e.Parameter as string) { case "about": - pivot.SelectedIndex = 2; + pivot.SelectedIndex = 1; break; - case "translate": + /*case "translate": pivot.SelectedIndex = 3; - break; + break;*/ } } } diff --git a/FoxTube/Pages/SettingsPages/Inbox.xaml.cs b/FoxTube/Pages/SettingsPages/Inbox.xaml.cs index a408174..bf40fe8 100644 --- a/FoxTube/Pages/SettingsPages/Inbox.xaml.cs +++ b/FoxTube/Pages/SettingsPages/Inbox.xaml.cs @@ -45,9 +45,7 @@ namespace FoxTube.Pages.SettingsPages items.Add(new InboxItem( e.GetAttribute("version"), e["content"].InnerText, - e.GetAttribute("time"), - e.GetAttribute("id") - )); + e.GetAttribute("time"))); doc.Load("http://foxgame.hol.es/foxtube-messages.xml"); foreach (XmlElement e in doc["posts"].ChildNodes) @@ -141,8 +139,9 @@ namespace FoxTube.Pages.SettingsPages } } - public void Open(string id) + public void Open(string arg) { + string id = arg.Split('&')[1]; InboxItem item = items.Find(x => x.Id == id); if(item != null) list.SelectedIndex = items.IndexOf(item);