diff --git a/FoxTube/Controls/CommentCard.xaml b/FoxTube/Controls/CommentCard.xaml
index c1934c1..4881343 100644
--- a/FoxTube/Controls/CommentCard.xaml
+++ b/FoxTube/Controls/CommentCard.xaml
@@ -23,14 +23,19 @@
+
-
-
+
+
+
+
+
+
-
+
@@ -39,7 +44,7 @@
-
+
diff --git a/FoxTube/Controls/CommentCard.xaml.cs b/FoxTube/Controls/CommentCard.xaml.cs
index c5b15a1..c55af90 100644
--- a/FoxTube/Controls/CommentCard.xaml.cs
+++ b/FoxTube/Controls/CommentCard.xaml.cs
@@ -57,9 +57,22 @@ namespace FoxTube.Controls
rating.Text = comment.Snippet.TopLevelComment.Snippet.LikeCount.HasValue ? comment.Snippet.TopLevelComment.Snippet.LikeCount.ToString() : "";
if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == SecretsVault.AccountId)
+ {
+ specialAuthor.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
+ authorBorder.Visibility = Visibility.Visible;
+ author.Visibility = Visibility.Collapsed;
editBtn.Visibility = Visibility.Visible;
+ }
+ else if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == Methods.MainPage.GetCurrentItem().Snippet.ChannelId)
+ {
+ specialAuthor.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
+ authorBorder.Visibility = Visibility.Visible;
+ author.Visibility = Visibility.Collapsed;
+ }
+ else
+ author.Text = comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName;
- meta.Text = string.Format("{0} | {1} {2}", comment.Snippet.TopLevelComment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.TopLevelComment.Snippet.PublishedAt.Value), comment.Snippet.TopLevelComment.Snippet.UpdatedAt != comment.Snippet.TopLevelComment.Snippet.PublishedAt ? "(edited)" : "");
+ meta.Text = string.Format("{0} {1}", Methods.GetAgo(comment.Snippet.TopLevelComment.Snippet.PublishedAt.Value), comment.Snippet.TopLevelComment.Snippet.UpdatedAt != comment.Snippet.TopLevelComment.Snippet.PublishedAt ? "(edited)" : "");
Methods.FormatText(ref text, comment.Snippet.TopLevelComment.Snippet.TextDisplay);
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.TopLevelComment.Snippet.AuthorProfileImageUrl)); }
@@ -89,7 +102,23 @@ namespace FoxTube.Controls
else
rating.Text = comment.Snippet.LikeCount.HasValue ? comment.Snippet.LikeCount.ToString() : "";
- meta.Text = string.Format("{0} | {1} {2}", comment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.PublishedAt.Value), comment.Snippet.UpdatedAt.Value != comment.Snippet.PublishedAt.Value ? "(edited)" : "");
+ if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == SecretsVault.AccountId)
+ {
+ specialAuthor.Text = comment.Snippet.AuthorDisplayName;
+ authorBorder.Visibility = Visibility.Visible;
+ author.Visibility = Visibility.Collapsed;
+ editBtn.Visibility = Visibility.Visible;
+ }
+ else if (item.Snippet.AuthorChannelId.ToString().Split('"')[3] == Methods.MainPage.GetCurrentItem().Snippet.ChannelId)
+ {
+ specialAuthor.Text = comment.Snippet.AuthorDisplayName;
+ authorBorder.Visibility = Visibility.Visible;
+ author.Visibility = Visibility.Collapsed;
+ }
+ else
+ author.Text = comment.Snippet.AuthorDisplayName;
+
+ meta.Text = string.Format("{0} {1}", comment.Snippet.AuthorDisplayName, Methods.GetAgo(comment.Snippet.PublishedAt.Value), comment.Snippet.UpdatedAt.Value != comment.Snippet.PublishedAt.Value ? "(edited)" : "");
Methods.FormatText(ref text, comment.Snippet.TextDisplay);
try { avatar.ProfilePicture = new BitmapImage(new Uri(comment.Snippet.AuthorProfileImageUrl)); }
diff --git a/FoxTube/Pages/MainPage.xaml.cs b/FoxTube/Pages/MainPage.xaml.cs
index 40f2833..2324e1c 100644
--- a/FoxTube/Pages/MainPage.xaml.cs
+++ b/FoxTube/Pages/MainPage.xaml.cs
@@ -144,6 +144,12 @@ namespace FoxTube
SetTitleBar();
}
+ public Video GetCurrentItem()
+ {
+ try { return (videoPlaceholder.Content as VideoPage).item; }
+ catch { return null; }
+ }
+
public void SetTitleBar()
{
var titleBar = ApplicationView.GetForCurrentView().TitleBar;
@@ -307,6 +313,7 @@ namespace FoxTube
public void GoToSearch(SearchParameters args)
{
+ nav.IsPaneOpen = false;
MinimizeAsInitializer();
content.Navigate(typeof(Search), args);
}
@@ -319,27 +326,31 @@ namespace FoxTube
public async void GoToVideo(string id, string playlistId = null)
{
- var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
- if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
+ try
{
- bool cancel = false;
- MessageDialog dialog = new MessageDialog("You are on metered connection now. Additional charges may apply. Do you want to continue?")
+ var connection = NetworkInformation.GetInternetConnectionProfile().GetConnectionCost();
+ if ((bool)settings.Values["moblieWarning"] && (connection.NetworkCostType == NetworkCostType.Fixed || connection.NetworkCostType == NetworkCostType.Variable))
{
- DefaultCommandIndex = 2,
- CancelCommandIndex = 1
- };
- dialog.Commands.Add(new UICommand("Yes"));
- dialog.Commands.Add(new UICommand("No", (command) => cancel = true));
- dialog.Commands.Add(new UICommand("Add to 'Watch later' playlist", (command) =>
- {
- //TO-DO: Adding video to "Watch later"
- cancel = true;
- }));
- await dialog.ShowAsync();
+ bool cancel = false;
+ MessageDialog dialog = new MessageDialog("You are on metered connection now. Additional charges may apply. Do you want to continue?")
+ {
+ DefaultCommandIndex = 2,
+ CancelCommandIndex = 1
+ };
+ dialog.Commands.Add(new UICommand("Yes"));
+ dialog.Commands.Add(new UICommand("No", (command) => cancel = true));
+ dialog.Commands.Add(new UICommand("Add to 'Watch later' playlist", (command) =>
+ {
+ //TO-DO: Adding video to "Watch later"
+ cancel = true;
+ }));
+ await dialog.ShowAsync();
- if (cancel)
- return;
+ if (cancel)
+ return;
+ }
}
+ catch { }
nav.IsPaneOpen = false;
diff --git a/FoxTube/Pages/VideoPage.xaml.cs b/FoxTube/Pages/VideoPage.xaml.cs
index 774d735..9a7bab6 100644
--- a/FoxTube/Pages/VideoPage.xaml.cs
+++ b/FoxTube/Pages/VideoPage.xaml.cs
@@ -63,7 +63,7 @@ namespace FoxTube.Pages
public string videoId;
string playlistId = null;
- Video item;
+ public Video item;
List downloads = new List();