-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add recycling of chapters when they fail
- Loading branch information
1 parent
88e2e5c
commit 0187679
Showing
3 changed files
with
25 additions
and
9 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
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
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,19 @@ | ||
using Mangarr.Stack.Database.Documents; | ||
using Mangarr.Stack.Database.Repositories; | ||
using Microsoft.AspNetCore.Components; | ||
|
||
namespace Mangarr.Stack.Pages.Activity; | ||
|
||
public partial class ActivityItem | ||
{ | ||
[Inject] public ChapterProgressRepository ChapterProgressRepository { get; set; } = null!; | ||
[Parameter] public ChapterProgressDocument Item { get; set; } = null!; | ||
[Parameter] public int Index { get; set; } | ||
[Parameter] public EventCallback OnDelete { get; set; } | ||
|
||
private async Task Recycle() | ||
{ | ||
await ChapterProgressRepository.DeleteAsync(Item); | ||
await OnDelete.InvokeAsync(); | ||
} | ||
} |