Archived
1
0

Optimizing, debugging, decorating

This commit is contained in:
Michael Gordeev
2019-02-08 12:50:43 +03:00
parent 9548be15f3
commit cc49cf9966
34 changed files with 681 additions and 730 deletions
+6 -4
View File
@@ -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)