Optimizing, debugging, decorating
This commit is contained in:
@@ -34,6 +34,8 @@ namespace FoxTube.Pages
|
||||
list = stack.Children[0] as VideoGrid;
|
||||
more = stack.Children[1] as ShowMore;
|
||||
|
||||
loading.RefreshPage += Refresh_Click;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(e.Parameter.ToString()))
|
||||
id = e.Parameter.ToString();
|
||||
|
||||
@@ -46,13 +48,13 @@ namespace FoxTube.Pages
|
||||
{
|
||||
loading.Refresh();
|
||||
|
||||
entries = id == "HL" ? await Methods.GetHistory() : await Methods.GetLater();
|
||||
entries = id == "HL" ? SecretsVault.History = await Methods.GetHistory() : SecretsVault.WatchLater = await Methods.GetLater();
|
||||
|
||||
for (int k = 0; k < 50 && k < entries.Count; k++)
|
||||
for (int k = 0; k < 25 && k < entries.Count; k++)
|
||||
list.Add(new VideoCard(entries[k]));
|
||||
|
||||
if (list.Count >= entries.Count)
|
||||
more.Complete(true);
|
||||
more.Visibility = Visibility.Collapsed;
|
||||
|
||||
loading.Close();
|
||||
}
|
||||
@@ -85,7 +87,7 @@ namespace FoxTube.Pages
|
||||
|
||||
private void ShowMore_Clicked()
|
||||
{
|
||||
for (int k = 50 * page++; k < 50 * page; k++)
|
||||
for (int k = 25 * page++; k < 25 * page; k++)
|
||||
list.Add(new VideoCard(entries[k]));
|
||||
|
||||
if (list.Count >= entries.Count)
|
||||
|
||||
Reference in New Issue
Block a user