mirror of
https://github.com/leiurayer/downkyi.git
synced 2025-04-26 21:20:45 +08:00
解决tabId溢出的问题 #661
This commit is contained in:
parent
8f54122e37
commit
3e1f3a74c5
src
DownKyi.Core/BiliApi
DownKyi
Services
ViewModels
@ -18,7 +18,7 @@ namespace DownKyi.Core.BiliApi.Favorites
|
||||
/// <returns></returns>
|
||||
public static List<FavoritesMedia> GetFavoritesMedia(long mediaId, int pn, int ps)
|
||||
{
|
||||
string url = $"https://api.bilibili.com/x/v3/fav/resource/list?media_id={mediaId}&pn={pn}&ps={ps}";
|
||||
string url = $"https://api.bilibili.com/x/v3/fav/resource/list?media_id={mediaId}&pn={pn}&ps={ps}&platform=web";
|
||||
string referer = "https://www.bilibili.com";
|
||||
string response = WebClient.RequestWeb(url, referer);
|
||||
|
||||
|
@ -210,7 +210,7 @@ namespace DownKyi.Core.BiliApi.Users
|
||||
/// <param name="ps">每页项数</param>
|
||||
/// <param name="order">排序方式</param>
|
||||
/// <returns></returns>
|
||||
public static List<RelationFollowInfo> GetFollowingGroupContent(int tagId, int pn, int ps, FollowingOrder order = FollowingOrder.DEFAULT)
|
||||
public static List<RelationFollowInfo> GetFollowingGroupContent(long tagId, int pn, int ps, FollowingOrder order = FollowingOrder.DEFAULT)
|
||||
{
|
||||
string orderType = "";
|
||||
if (order == FollowingOrder.ATTENTION)
|
||||
|
@ -112,7 +112,7 @@ namespace DownKyi.Core.BiliApi.Users
|
||||
/// <param name="tid">视频分区</param>
|
||||
/// <param name="keyword">搜索关键词</param>
|
||||
/// <returns></returns>
|
||||
public static SpacePublicationList GetPublication(long mid, int pn, int ps, int tid = 0, PublicationOrder order = PublicationOrder.PUBDATE, string keyword = "")
|
||||
public static SpacePublicationList GetPublication(long mid, int pn, int ps, long tid = 0, PublicationOrder order = PublicationOrder.PUBDATE, string keyword = "")
|
||||
{
|
||||
string url = $"https://api.bilibili.com/x/space/arc/search?mid={mid}&pn={pn}&ps={ps}&order={order.ToString("G").ToLower()}&tid={tid}&keyword={keyword}";
|
||||
string referer = "https://www.bilibili.com";
|
||||
|
@ -198,7 +198,7 @@ namespace DownKyi.Services
|
||||
|
||||
App.PropertyChangeAsync(new Action(() =>
|
||||
{
|
||||
tabHeaders.Add(new TabHeader { Id = (int)item.Id, Title = item.Title, SubTitle = item.MediaCount.ToString() });
|
||||
tabHeaders.Add(new TabHeader { Id = item.Id, Title = item.Title, SubTitle = item.MediaCount.ToString() });
|
||||
}));
|
||||
}
|
||||
}
|
||||
@ -223,7 +223,7 @@ namespace DownKyi.Services
|
||||
|
||||
App.PropertyChangeAsync(new Action(() =>
|
||||
{
|
||||
tabHeaders.Add(new TabHeader { Id = (int)item.Id, Title = item.Title, SubTitle = item.MediaCount.ToString() });
|
||||
tabHeaders.Add(new TabHeader { Id = item.Id, Title = item.Title, SubTitle = item.MediaCount.ToString() });
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ namespace DownKyi.ViewModels.Friends
|
||||
return true;
|
||||
}
|
||||
|
||||
private async Task<bool> LoadFollowingGroupContent(int tagId, int pn, int ps)
|
||||
private async Task<bool> LoadFollowingGroupContent(long tagId, int pn, int ps)
|
||||
{
|
||||
List<RelationFollowInfo> contents = null;
|
||||
await Task.Run(() =>
|
||||
|
@ -5,8 +5,8 @@ namespace DownKyi.ViewModels.PageViewModels
|
||||
{
|
||||
public class TabHeader : BindableBase
|
||||
{
|
||||
private int id;
|
||||
public int Id
|
||||
private long id;
|
||||
public long Id
|
||||
{
|
||||
get => id;
|
||||
set => SetProperty(ref id, value);
|
||||
|
@ -110,7 +110,7 @@ namespace DownKyi.ViewModels
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="isFirst"></param>
|
||||
private void NavigationView(int id, bool isFirst)
|
||||
private void NavigationView(long id, bool isFirst)
|
||||
{
|
||||
// isFirst参数表示是否是从PageFriends的headerTable的item点击进入的
|
||||
// true表示加载PageFriends后第一次进入
|
||||
|
@ -152,8 +152,8 @@ namespace DownKyi.ViewModels
|
||||
|
||||
TabHeaders = new ObservableCollection<TabHeader>
|
||||
{
|
||||
new TabHeader { Id = (int)Core.BiliApi.Users.Models.BangumiType.ANIME, Title = DictionaryResource.GetString("FollowAnime") },
|
||||
new TabHeader { Id = (int)Core.BiliApi.Users.Models.BangumiType.EPISODE, Title = DictionaryResource.GetString("FollowMovie") }
|
||||
new TabHeader { Id = (long)Core.BiliApi.Users.Models.BangumiType.ANIME, Title = DictionaryResource.GetString("FollowAnime") },
|
||||
new TabHeader { Id = (long)Core.BiliApi.Users.Models.BangumiType.EPISODE, Title = DictionaryResource.GetString("FollowMovie") }
|
||||
};
|
||||
|
||||
Medias = new ObservableCollection<BangumiFollowMedia>();
|
||||
|
Loading…
Reference in New Issue
Block a user