diff --git a/FoxTube/App.xaml b/FoxTube/App.xaml
index b0d3345..41a4760 100644
--- a/FoxTube/App.xaml
+++ b/FoxTube/App.xaml
@@ -2,33 +2,8 @@
x:Class="FoxTube.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:FoxTube"
- RequestedTheme="Light">
+ xmlns:local="using:FoxTube">
-
-
-
-
-
-
+ Red
diff --git a/FoxTube/App.xaml.cs b/FoxTube/App.xaml.cs
index 5fe7b58..eb5371f 100644
--- a/FoxTube/App.xaml.cs
+++ b/FoxTube/App.xaml.cs
@@ -8,6 +8,7 @@ using Windows.ApplicationModel.Activation;
using Windows.ApplicationModel.Core;
using Windows.Foundation;
using Windows.Foundation.Collections;
+using Windows.Storage;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -28,8 +29,23 @@ namespace FoxTube
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
///
+ ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
public App()
{
+ try
+ {
+ switch((int)settings.Values["themeMode"])
+ {
+ case 0:
+ RequestedTheme = ApplicationTheme.Light;
+ break;
+ case 1:
+ RequestedTheme = ApplicationTheme.Dark;
+ break;
+ case 2:
+ break;
+ }
+ } catch { }
this.InitializeComponent();
this.Suspending += OnSuspending;
}
diff --git a/FoxTube/Classes/ObjectEventArgs.cs b/FoxTube/Classes/ObjectEventArgs.cs
index 5e60964..eea6edf 100644
--- a/FoxTube/Classes/ObjectEventArgs.cs
+++ b/FoxTube/Classes/ObjectEventArgs.cs
@@ -6,6 +6,8 @@ using System.Threading.Tasks;
namespace FoxTube
{
+ public delegate void Event();
+
public delegate void ObjectEventHandler(object sender, params object[] args);
public class SearchParameters
diff --git a/FoxTube/Classes/SecretsVault.cs b/FoxTube/Classes/SecretsVault.cs
index b090454..842c6ad 100644
--- a/FoxTube/Classes/SecretsVault.cs
+++ b/FoxTube/Classes/SecretsVault.cs
@@ -35,7 +35,7 @@ namespace FoxTube
public static string AccountId { get; private set; }
public static bool IsAuthorized { get; private set; } = false;
- public static Google.Apis.YouTube.v3.Data.Channel UserChannel { get; private set; }
+ public static Channel UserChannel { get; private set; }
public static List WatchLater { get; private set; } = new List();
public static List UserHistory { get; private set; } = new List();
public static List Subscriptions { get; private set; } = new List();
@@ -180,6 +180,7 @@ namespace FoxTube
if(await Credential.RevokeTokenAsync(CancellationToken.None))
{
Credential = null;
+ IsAuthorized = false;
AuthorizationStateChanged.Invoke(null, null);
settings.Values["authorized"] = false;
}
@@ -192,5 +193,21 @@ namespace FoxTube
else
Authorize();
}
+
+ public static bool AdsDisabled { get; private set; } = true;
+
+ public static void CheckAddons()
+ {
+ //TO-DO: Check addons list
+ bool purchased = true;
+
+ if(!purchased)
+ {
+ AdsDisabled = false;
+ NotPurchased.Invoke();
+ }
+ }
+
+ public static event Event NotPurchased;
}
}
diff --git a/FoxTube/Controls/ChannelCard.xaml b/FoxTube/Controls/ChannelCard.xaml
index e07827b..4e0abec 100644
--- a/FoxTube/Controls/ChannelCard.xaml
+++ b/FoxTube/Controls/ChannelCard.xaml
@@ -12,7 +12,7 @@
d:DesignWidth="384">