Notification system development 1
This commit is contained in:
+23
-2
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -72,8 +73,6 @@ namespace FoxTube
|
|||||||
/// <param name="e">Details about the launch request and process.</param>
|
/// <param name="e">Details about the launch request and process.</param>
|
||||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||||
{
|
{
|
||||||
SecretsVault.CheckAuthorization();
|
|
||||||
|
|
||||||
Frame rootFrame = Window.Current.Content as Frame;
|
Frame rootFrame = Window.Current.Content as Frame;
|
||||||
|
|
||||||
// Do not repeat app initialization when the Window already has content,
|
// Do not repeat app initialization when the Window already has content,
|
||||||
@@ -110,6 +109,28 @@ namespace FoxTube
|
|||||||
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
|
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnActivated(IActivatedEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnActivated(e);
|
||||||
|
|
||||||
|
if (e is ToastNotificationActivatedEventArgs)
|
||||||
|
{
|
||||||
|
string[] args = (e as ToastNotificationActivatedEventArgs).Argument.Split('|');
|
||||||
|
switch (args[0])
|
||||||
|
{
|
||||||
|
case "changelog":
|
||||||
|
case "inbox":
|
||||||
|
Methods.MainPage.GoToDeveloper(args[1]);
|
||||||
|
break;
|
||||||
|
|
||||||
|
//TODO: The rest
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
|
||||||
|
Window.Current.Activate();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Invoked when Navigation to a certain page fails
|
/// Invoked when Navigation to a certain page fails
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace FoxTube
|
|||||||
if (settings.Values["ver"] == null)
|
if (settings.Values["ver"] == null)
|
||||||
settings.Values.Add("ver", $"{ver.Major}.{ver.Minor}");
|
settings.Values.Add("ver", $"{ver.Major}.{ver.Minor}");
|
||||||
|
|
||||||
if((string)settings.Values["ver"] != $"{ver.Major}.{ver.Minor}") //Replace for '!=' !!!
|
if((string)settings.Values["ver"] == $"{ver.Major}.{ver.Minor}") //Replace for '!=' !!!
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -91,6 +91,7 @@ namespace FoxTube
|
|||||||
|
|
||||||
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
SecretsVault.AuthorizationStateChanged += Vault_AuthorizationStateChanged;
|
||||||
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
SecretsVault.SubscriptionsChanged += SecretsVault_SubscriptionsChanged;
|
||||||
|
SecretsVault.CheckAuthorization();
|
||||||
SetTitleBar();
|
SetTitleBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user