favorite & view page & etc.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Gallery.Util.Model;
|
||||
using Xamarin.Forms;
|
||||
|
||||
@ -7,17 +8,28 @@ namespace Gallery.Util.Interface
|
||||
public interface IGallerySource
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
string Route { get; }
|
||||
|
||||
string FlyoutIconKey { get; }
|
||||
|
||||
string HomePage { get; }
|
||||
bool IsScrollable { get; }
|
||||
|
||||
void SetCookie();
|
||||
|
||||
void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark);
|
||||
Task<IEnumerable<GalleryItem>> GetRecentItemsAsync(int page);
|
||||
Task<string> ResolveImageUrl(GalleryItem item);
|
||||
}
|
||||
|
||||
Task<GalleryItem[]> GetRecentItemsAsync(int page);
|
||||
public abstract class GallerySourceBase : IGallerySource
|
||||
{
|
||||
public abstract string Name { get; }
|
||||
public abstract string Route { get; }
|
||||
public abstract string FlyoutIconKey { get; }
|
||||
public abstract string HomePage { get; }
|
||||
public virtual bool IsScrollable => true;
|
||||
|
||||
public abstract void SetCookie();
|
||||
public abstract void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark);
|
||||
public abstract Task<IEnumerable<GalleryItem>> GetRecentItemsAsync(int page);
|
||||
public virtual Task<string> ResolveImageUrl(GalleryItem item) => Task.FromResult(item.RawUrl);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user