#221: Fixed
This commit is contained in:
@@ -16,6 +16,7 @@ using Windows.Storage.Pickers;
|
||||
using Windows.UI.Notifications;
|
||||
using Microsoft.Toolkit.Uwp.Notifications;
|
||||
using System.Diagnostics;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FoxTube.Controls
|
||||
{
|
||||
@@ -70,7 +71,7 @@ namespace FoxTube.Controls
|
||||
donePanel.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
async void Download(MediaStreamInfo info, Video meta, string q)
|
||||
async Task Download(MediaStreamInfo info, Video meta, string q)
|
||||
{
|
||||
InProgress = true;
|
||||
Container = new DownloadItemContainer();
|
||||
|
||||
@@ -416,14 +416,16 @@ namespace FoxTube
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
nav.CompactModeThresholdWidth = 641;
|
||||
nav.ExpandedModeThresholdWidth = 1008;
|
||||
nav.Margin = new Thickness(0);
|
||||
nav.OpenPaneLength = 300;
|
||||
nav.CompactPaneLength = 40;
|
||||
if (videoPlaceholder.Content != null && nav.IsPaneOpen)
|
||||
nav.IsPaneOpen = false;
|
||||
else
|
||||
{
|
||||
nav.OpenPaneLength = 300;
|
||||
nav.CompactPaneLength = 40;
|
||||
}
|
||||
SetTitleBar();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace FoxTube.Pages.SettingsPages
|
||||
/// </summary>
|
||||
public sealed partial class Inbox : Page
|
||||
{
|
||||
List<InboxItem> backup = new List<InboxItem>();
|
||||
List<InboxItem> items = new List<InboxItem>();
|
||||
public Inbox()
|
||||
{
|
||||
@@ -57,43 +56,34 @@ namespace FoxTube.Pages.SettingsPages
|
||||
));
|
||||
|
||||
items.OrderBy(item => item.TimeStamp);
|
||||
|
||||
foreach (InboxItem i in items)
|
||||
backup.Add(i);
|
||||
}
|
||||
catch { }
|
||||
|
||||
list.ItemsSource = items;
|
||||
items.ForEach(i => list.Items.Add(i));
|
||||
}
|
||||
|
||||
private void filter_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
items.Clear();
|
||||
list.ItemsSource = null;
|
||||
list.Items.Clear();
|
||||
|
||||
switch (filter.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
foreach (InboxItem i in backup)
|
||||
items.Add(i);
|
||||
items.ForEach(i => list.Items.Add(i));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
foreach (InboxItem i in backup)
|
||||
if(i.Type == InboxItemType.Default)
|
||||
items.Add(i);
|
||||
List<InboxItem> messages = items.FindAll(i => i.Type == InboxItemType.Default);
|
||||
messages.ForEach(i => list.Items.Add(i));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
foreach (InboxItem i in backup)
|
||||
if (i.Type == InboxItemType.PatchNote)
|
||||
items.Add(i);
|
||||
List<InboxItem> notes = items.FindAll(i => i.Type == InboxItemType.PatchNote);
|
||||
notes.ForEach(i => list.Items.Add(i));
|
||||
break;
|
||||
}
|
||||
|
||||
list.ItemsSource = items;
|
||||
}
|
||||
catch(NullReferenceException) { }
|
||||
}
|
||||
@@ -144,7 +134,7 @@ namespace FoxTube.Pages.SettingsPages
|
||||
string id = arg.Split('&')[1];
|
||||
InboxItem item = items.Find(x => x.Id == id);
|
||||
if(item != null)
|
||||
list.SelectedIndex = items.IndexOf(item);
|
||||
list.SelectedItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user