diff --git a/FoxTube/Pages/ChannelPage.xaml b/FoxTube/Pages/ChannelPage.xaml
index 69c3592..450fa9e 100644
--- a/FoxTube/Pages/ChannelPage.xaml
+++ b/FoxTube/Pages/ChannelPage.xaml
@@ -38,7 +38,7 @@
Log in to manage your subscriptions
-
+
diff --git a/FoxTube/Pages/ChannelPage.xaml.cs b/FoxTube/Pages/ChannelPage.xaml.cs
index 6b7453c..1491eb3 100644
--- a/FoxTube/Pages/ChannelPage.xaml.cs
+++ b/FoxTube/Pages/ChannelPage.xaml.cs
@@ -54,7 +54,7 @@ namespace FoxTube.Pages
public ChannelPage()
{
- this.InitializeComponent();
+ InitializeComponent();
loading = grid.Children[2] as LoadingPage;
playlistLoading = playlists.Children[1] as LoadingPage;
@@ -83,7 +83,7 @@ namespace FoxTube.Pages
loading.Refresh();
playlistLoading.Refresh();
- try
+ //try
{
channelId = id;
if (Methods.NeedToResponse)
@@ -136,32 +136,25 @@ namespace FoxTube.Pages
if (SecretsVault.IsAuthorized)
{
- bool b = false;
- foreach (Subscription s in SecretsVault.Subscriptions)
+ if (SecretsVault.Subscriptions.Any(i => i.Snippet.ResourceId.ChannelId == channelId))
{
- if (s.Snippet.ResourceId.ChannelId == item.Id)
- {
- Debug.WriteLine($"{s.Snippet.ResourceId.ChannelId} ({item.Snippet.Title}: {item.Id})");
- subscribe.Background = new SolidColorBrush(Colors.Transparent);
- subscribe.Foreground = new SolidColorBrush(Colors.Gray);
- subscribe.Content = "Subscribed";
- b = true;
- break;
- }
+ subscribe.Background = new SolidColorBrush(Colors.Transparent);
+ subscribe.Foreground = new SolidColorBrush(Colors.Gray);
+ subscribe.Content = "Subscribed";
}
subscriptionPane.Visibility = Visibility.Visible;
}
loading.Close();
}
- catch (System.Net.Http.HttpRequestException)
+ /*catch (System.Net.Http.HttpRequestException)
{
loading.Error("System.Net.Http.HttpRequestException", "Unable to connect to Google servers.", true);
}
catch (Exception e)
{
loading.Error(e.GetType().ToString(), e.Message);
- }
+ }*/
}
async void LoadPlaylist()
@@ -290,7 +283,7 @@ namespace FoxTube.Pages
private void refresh_Click(object sender, RoutedEventArgs e)
{
- Initialize(channelId);
+ Methods.MainPage.GoToChannel(channelId);
}
private async void inBrowser_Click(object sender, RoutedEventArgs e)
diff --git a/FoxTube/Pages/MainPage.xaml.cs b/FoxTube/Pages/MainPage.xaml.cs
index 4ddebb0..1dc25c3 100644
--- a/FoxTube/Pages/MainPage.xaml.cs
+++ b/FoxTube/Pages/MainPage.xaml.cs
@@ -335,11 +335,10 @@ namespace FoxTube
return;
videoPlaceholder.Content = null;
- MaximizeVideo();
Fullscreen(false);
videoPlaceholder.Navigate(typeof(VideoPage), new string[2] { id, playlistId });
- nav.Header = "Video";
+ MaximizeVideo();
}
public void GoToDeveloper(string id)
@@ -402,6 +401,15 @@ namespace FoxTube
{ typeof(Downloads), () => nav.Header = "Downloads" }
};
+ if (content.SourcePageType == typeof(Home) || content.SourcePageType == typeof(Settings) || content.SourcePageType == typeof(Subscriptions))
+ {
+ nav.ExpandedModeThresholdWidth = 1008;
+ if (nav.DisplayMode == NavigationViewDisplayMode.Expanded)
+ nav.IsPaneOpen = true;
+ }
+ else
+ nav.ExpandedModeThresholdWidth = short.MaxValue;
+
try { switchCase[content.SourcePageType](); }
catch { }
}
@@ -417,7 +425,11 @@ namespace FoxTube
nav.IsBackEnabled = true;
if (videoPlaceholder.Content != null)
+ {
nav.Header = "Video";
+ nav.ExpandedModeThresholdWidth = short.MaxValue;
+ nav.IsPaneOpen = false;
+ }
}
public void Fullscreen(bool on)
@@ -531,7 +543,6 @@ namespace FoxTube
public void content_Navigated(object sender, NavigationEventArgs e)
{
- Debug.WriteLine($"Navigated to {e.SourcePageType}");
Dictionary switchCase = new Dictionary()
{
{ typeof(Settings), () => nav.Header = "Settings" },
@@ -682,7 +693,7 @@ namespace FoxTube
nav.IsPaneOpen = true;
}
else
- nav.ExpandedModeThresholdWidth = int.MaxValue;
+ nav.ExpandedModeThresholdWidth = short.MaxValue;
if (videoPlaceholder.Content != null && videoPlaceholder.HorizontalAlignment == HorizontalAlignment.Stretch)
MinimizeAsInitializer();