Fix/chapter mark as unread not resetting last page read (#282)

* [ChapterCard] Reset last page read to first page when changing chapters read status

The last page read was set to the second page instead of the first one

* [ChapterList] Reset last page read to first page when changing chapters read status

The "ChapterCard" and the "FAB" didn't have the same behaviour when marking a chapter as unread.
The "ChapterCard" also reset the last read page while the FAB only changed the read status.
This commit is contained in:
schroda
2023-04-12 18:37:23 +02:00
committed by GitHub
parent 22b3437dcd
commit c81189a9ed
2 changed files with 5 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ const ChapterCard: React.FC<IProps> = (props: IProps) => {
const formData = new FormData();
formData.append(key, value);
if (key === 'read') {
formData.append('lastPageRead', '1');
formData.append('lastPageRead', '0');
}
client
.patch(`/api/v1/manga/${chapter.mangaId}/chapter/${chapter.index}`, formData)