-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
287 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System.Collections.Generic; | ||
using Anikin.Utils; | ||
using Anikin.Utils.Extensions; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
using Jita.AniList.Models; | ||
|
||
namespace Anikin.Models; | ||
|
||
public partial class AnimeHomeRange : ObservableObject | ||
{ | ||
public string Name { get; set; } | ||
|
||
[ObservableProperty] | ||
bool _isLoading; | ||
|
||
public AnimeHomeTypes Type { get; set; } | ||
|
||
public ObservableRangeCollection<Media> Medias { get; set; } = new(); | ||
|
||
[ObservableProperty] | ||
private bool _isSelected; | ||
|
||
public AnimeHomeRange(AnimeHomeTypes type) | ||
{ | ||
Type = type; | ||
Name = Type.GetBestDisplayName(); | ||
} | ||
|
||
public AnimeHomeRange(AnimeHomeTypes type, IEnumerable<Media> medias) : this(type) | ||
{ | ||
Medias.AddRange(medias); | ||
} | ||
|
||
public override string ToString() => Name; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.ComponentModel; | ||
|
||
namespace Anikin.Models; | ||
|
||
public enum AnimeHomeTypes | ||
{ | ||
[Description("Popular")] | ||
Popular, | ||
|
||
[Description("Recently Updated")] | ||
LastUpdated, | ||
|
||
[Description("Current Season")] | ||
CurrentSeason, | ||
|
||
[Description("Trending")] | ||
Trending, | ||
|
||
[Description("New Season")] | ||
NewSeason, | ||
|
||
[Description("Feminine Audience")] | ||
FeminineMedia, | ||
|
||
[Description("Male Audience")] | ||
MaleMedia, | ||
|
||
[Description("Trash Anime")] | ||
TrashMedia | ||
} |
Oops, something went wrong.