Video cards fixes. Localization fixes. CardAdvert created
Related Work Items: #244, #245
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
</NavigationViewItem.Icon>
|
||||
</NavigationViewItem>
|
||||
|
||||
<NavigationViewItem x:Uid="/Main/adsFree" Content="Remove ads" Visibility="Collapsed" Name="removeAds">
|
||||
<NavigationViewItem x:Uid="/Main/adsFree" Content="Remove ads" Visibility="Collapsed" Tapped="RemoveAds_Tapped" Name="removeAds">
|
||||
<NavigationViewItem.Icon>
|
||||
<FontIcon Glyph=""/>
|
||||
</NavigationViewItem.Icon>
|
||||
|
||||
@@ -41,10 +41,14 @@ namespace FoxTube
|
||||
InitializeComponent();
|
||||
|
||||
CheckVersion();
|
||||
|
||||
|
||||
SecretsVault.AuthorizationStateChanged += AuthorizationStateChanged;
|
||||
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
||||
SecretsVault.NotPurchased += () => removeAds.Visibility = Visibility.Visible;
|
||||
SecretsVault.Purchased += (sender, e) =>
|
||||
{
|
||||
removeAds.Visibility = (e[0] as bool?).Value ? Visibility.Collapsed : Visibility.Visible;
|
||||
content.Navigate(typeof(Home));
|
||||
};
|
||||
SecretsVault.CheckAuthorization();
|
||||
SecretsVault.CheckAddons();
|
||||
|
||||
@@ -351,7 +355,7 @@ namespace FoxTube
|
||||
|
||||
if (videoPlaceholder.Content != null)
|
||||
(videoPlaceholder.Content as VideoPage).player.close_Click(this, null);
|
||||
|
||||
|
||||
videoPlaceholder.Content = null;
|
||||
Fullscreen(false);
|
||||
|
||||
@@ -740,5 +744,10 @@ namespace FoxTube
|
||||
{
|
||||
((NavigationViewItem)sender).ContextFlyout.ShowAt((NavigationViewItem)sender);
|
||||
}
|
||||
|
||||
private void RemoveAds_Tapped(object sender, TappedRoutedEventArgs e)
|
||||
{
|
||||
SecretsVault.GetAdblock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using FoxTube.Controls.Adverts;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace FoxTube.Pages
|
||||
{
|
||||
@@ -17,8 +18,8 @@ namespace FoxTube.Pages
|
||||
public void Add(UIElement card)
|
||||
{
|
||||
list.Items.Add(card);
|
||||
if (list.Items.Count % 5 == 0)
|
||||
list.Items.Add(new CardAdvert());
|
||||
/*if (list.Items.Count % 10 == 0)
|
||||
list.Items.Add(new CardAdvert());*/
|
||||
empty.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using FoxTube.Controls;
|
||||
using FoxTube.Controls.Adverts;
|
||||
using Google.Apis.YouTube.v3;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using System;
|
||||
|
||||
Reference in New Issue
Block a user