Archived
1
0

Notification system development 1

This commit is contained in:
Michael Gordeev
2018-10-24 21:23:48 +03:00
parent f545edc6c1
commit 1a93ea4801
2 changed files with 25 additions and 3 deletions
+23 -2
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -72,8 +73,6 @@ namespace FoxTube
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
SecretsVault.CheckAuthorization();
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
@@ -110,6 +109,28 @@ namespace FoxTube
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>
/// Invoked when Navigation to a certain page fails
/// </summary>