feature: search in ranking page
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
@@ -17,6 +16,7 @@ namespace Pixiview.Illust
|
||||
public interface IIllustCollectionPage
|
||||
{
|
||||
List<IllustItem> Favorites { get; }
|
||||
IllustCollection IllustCollection { get; set; }
|
||||
}
|
||||
|
||||
public abstract class IllustDataCollectionPage : IllustCollectionPage<IllustData> { }
|
||||
@@ -61,6 +61,7 @@ namespace Pixiview.Illust
|
||||
}
|
||||
|
||||
public List<IllustItem> Favorites { get; } = new List<IllustItem>();
|
||||
public IllustCollection IllustCollection { get; set; }
|
||||
|
||||
protected virtual bool IsFavoriteVisible => true;
|
||||
|
||||
@@ -122,14 +123,7 @@ namespace Pixiview.Illust
|
||||
columns = 2;
|
||||
break;
|
||||
case Orientation.PortraitUpsideDown:
|
||||
if (DeviceInfo.Idiom == DeviceIdiom.Phone)
|
||||
{
|
||||
columns = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
columns = 2;
|
||||
}
|
||||
columns = isPhone ? 4 : 2;
|
||||
break;
|
||||
case Orientation.Unknown:
|
||||
case Orientation.LandscapeLeft:
|
||||
@@ -323,6 +317,7 @@ namespace Pixiview.Illust
|
||||
item.IsFavorite = Favorites.Any(i => i.Id == item.Id);
|
||||
}
|
||||
}
|
||||
IllustCollection = collection;
|
||||
Illusts = collection;
|
||||
Loading = false;
|
||||
|
||||
@@ -361,7 +356,7 @@ namespace Pixiview.Illust
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class IllustCollection : ObservableCollection<IllustItem>
|
||||
public class IllustCollection : List<IllustItem>
|
||||
{
|
||||
private static readonly object sync = new object();
|
||||
private static IllustCollection empty;
|
||||
|
||||
Reference in New Issue
Block a user