From eddd5216f3a65dce228168a6710bbcebd6b33b64 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Sun, 14 Apr 2019 12:38:42 +0300 Subject: [PATCH] Fixed comment advert Test ads are now on --- FoxTube/Classes/SecretsVault.cs | 2 +- FoxTube/Controls/Adverts/CommentAdvert.xaml | 3 ++- FoxTube/Controls/Adverts/CommentAdvert.xaml.cs | 2 ++ FoxTube/Controls/Player/PlayerControls.cs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/FoxTube/Classes/SecretsVault.cs b/FoxTube/Classes/SecretsVault.cs index d92c748..cc0c68a 100644 --- a/FoxTube/Classes/SecretsVault.cs +++ b/FoxTube/Classes/SecretsVault.cs @@ -42,7 +42,7 @@ namespace FoxTube }; public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService; public static HttpClient HttpClient { get; } = new HttpClient(); - private static bool TestAds => false; //Change this bool + private static bool TestAds => true; //Change this bool public static string AppId => TestAds ? "d25517cb-12d4-4699-8bdc-52040c712cab" : "9ncqqxjtdlfh"; public static string AdUnitId => TestAds ? "test" : "1100044398"; public static bool AdsDisabled { get; private set; } = true; diff --git a/FoxTube/Controls/Adverts/CommentAdvert.xaml b/FoxTube/Controls/Adverts/CommentAdvert.xaml index babef6c..c869e5f 100644 --- a/FoxTube/Controls/Adverts/CommentAdvert.xaml +++ b/FoxTube/Controls/Adverts/CommentAdvert.xaml @@ -5,7 +5,8 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" - d:DesignWidth="400"> + d:DesignWidth="400" + Visibility="Collapsed"> diff --git a/FoxTube/Controls/Adverts/CommentAdvert.xaml.cs b/FoxTube/Controls/Adverts/CommentAdvert.xaml.cs index 4cdac3a..a2bfad7 100644 --- a/FoxTube/Controls/Adverts/CommentAdvert.xaml.cs +++ b/FoxTube/Controls/Adverts/CommentAdvert.xaml.cs @@ -52,6 +52,8 @@ namespace FoxTube.Controls.Adverts meta.Text += advert.Price; meta.Text += " " + advert.Rating; meta.Visibility = string.IsNullOrWhiteSpace(meta.Text) ? Visibility.Collapsed : Visibility.Visible; + + Visibility = Visibility.Visible; } } } diff --git a/FoxTube/Controls/Player/PlayerControls.cs b/FoxTube/Controls/Player/PlayerControls.cs index 61f0d4e..5d249d5 100644 --- a/FoxTube/Controls/Player/PlayerControls.cs +++ b/FoxTube/Controls/Player/PlayerControls.cs @@ -146,7 +146,7 @@ namespace FoxTube private void QualitySelector_SelectionChanged(object sender, SelectionChangedEventArgs e) { SettingsStorage.RememberedQuality = e.AddedItems[0] as string; - MediaStreamInfo item = MediaStreams.Muxed.Find(i => i.VideoQualityLabel == e.AddedItems[0] as string); + MediaStreamInfo item = MediaStreams.Muxed.Find(i => i.VideoQualityLabel.Contains(e.AddedItems[0] as string)); if (item == null) item = MediaStreams.Video.Find(i => i.VideoQualityLabel == e.AddedItems[0] as string);