favorite & view page & etc.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Gallery.Util;
|
||||
@ -8,14 +9,14 @@ using Xamarin.Forms;
|
||||
|
||||
namespace Gallery.Sources.Yandere
|
||||
{
|
||||
public class GallerySource : IGallerySource
|
||||
public class GallerySource : GallerySourceBase
|
||||
{
|
||||
public string Name => "Yande.re";
|
||||
public string Route => "yandere";
|
||||
public string FlyoutIconKey => "Yandere";
|
||||
public string HomePage => "https://yande.re";
|
||||
public override string Name => "Yande.re";
|
||||
public override string Route => "yandere";
|
||||
public override string FlyoutIconKey => "Yandere";
|
||||
public override string HomePage => "https://yande.re";
|
||||
|
||||
public async Task<GalleryItem[]> GetRecentItemsAsync(int page)
|
||||
public override async Task<IEnumerable<GalleryItem>> GetRecentItemsAsync(int page)
|
||||
{
|
||||
var url = $"https://yande.re/post?page={page}";
|
||||
var (result, error) = await NetHelper.RequestObject<YandereItem[]>(url, contentHandler: ContentHandler);
|
||||
@ -37,7 +38,8 @@ namespace Gallery.Sources.Yandere
|
||||
UpdatedTime = y.updated_at.ToLocalTime(),
|
||||
UserId = y.creator_id.ToString(),
|
||||
UserName = y.author,
|
||||
Source = y.source,
|
||||
Source = Route,
|
||||
SourceUrl = y.source,
|
||||
PreviewUrl = y.preview_url,
|
||||
RawUrl = y.file_url,
|
||||
Width = y.width,
|
||||
@ -60,12 +62,12 @@ namespace Gallery.Sources.Yandere
|
||||
return $"[{string.Join(',', array)}]";
|
||||
}
|
||||
|
||||
public void SetCookie()
|
||||
public override void SetCookie()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark)
|
||||
public override void InitDynamicResources(string family, ResourceDictionary light, ResourceDictionary dark)
|
||||
{
|
||||
var icon = new FontImageSource
|
||||
{
|
||||
|
Reference in New Issue
Block a user