Notifications foreground processing
This commit is contained in:
+15
-14
@@ -1,26 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices.WindowsRuntime;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.ApplicationModel.Activation;
|
||||
using Windows.ApplicationModel.Core;
|
||||
using Windows.Foundation;
|
||||
using Windows.Foundation.Collections;
|
||||
using Windows.Globalization;
|
||||
using Windows.Storage;
|
||||
using Windows.UI;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.ViewManagement;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Controls.Primitives;
|
||||
using Windows.UI.Xaml.Data;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using Windows.UI.Xaml.Media;
|
||||
using Windows.UI.Xaml.Navigation;
|
||||
|
||||
namespace FoxTube
|
||||
@@ -123,7 +110,21 @@ namespace FoxTube
|
||||
Methods.MainPage.GoToDeveloper(args[1]);
|
||||
break;
|
||||
|
||||
//TODO: The rest
|
||||
case "video":
|
||||
Methods.MainPage.GoToVideo(args[1]);
|
||||
break;
|
||||
|
||||
case "dcancel":
|
||||
Methods.MainPage.Agent.Remove(args[1]);
|
||||
break;
|
||||
|
||||
case "channel":
|
||||
Methods.MainPage.GoToChannel(args[1]);
|
||||
break;
|
||||
|
||||
case "later":
|
||||
//Add to WL playlist
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,13 @@ namespace FoxTube.Controls
|
||||
|
||||
public void Remove(string id)
|
||||
{
|
||||
items.Remove(items.Find(x => x.Container.Id == id));
|
||||
DownloadItem item = items.Find(x => x.Container.Id == id);
|
||||
if (item == null)
|
||||
return;
|
||||
if (item.InProgress)
|
||||
item.cancel_Click(this, null);
|
||||
else
|
||||
items.Remove(item);
|
||||
}
|
||||
|
||||
public async void QuitPrompt()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.IO;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using System.Net;
|
||||
using Windows.UI.Xaml.Media.Imaging;
|
||||
using Windows.System;
|
||||
using FoxTube.Classes;
|
||||
@@ -14,7 +13,6 @@ using System.Threading;
|
||||
using System.Xml;
|
||||
using Windows.UI.Popups;
|
||||
using Windows.Storage.Pickers;
|
||||
using System.Diagnostics;
|
||||
using Windows.UI.Notifications;
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
|
||||
@@ -196,7 +194,7 @@ namespace FoxTube.Controls
|
||||
Methods.MainPage.Agent.Remove(Container.Id);
|
||||
}
|
||||
|
||||
private async void cancel_Click(object sender, RoutedEventArgs e)
|
||||
public async void cancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(InProgress)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user