Fetch manga chapter infos on chapter list refresh
In case an uninitialized manga was opened from the library, the manga and its chapter list got refreshed. However, the chapter infos (e.g. unread, downloaded count, etc.) were not requested with the chapter list mutation, which resulted in this information to be missing
This commit is contained in:
@@ -34,6 +34,33 @@ export const MANGA_CHAPTER_STAT_FIELDS = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const MANGA_CHAPTER_NODE_FIELDS = gql`
|
||||
fragment MANGA_CHAPTER_NODE_FIELDS on MangaType {
|
||||
firstUnreadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
}
|
||||
lastReadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
lastReadAt
|
||||
}
|
||||
latestReadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
lastReadAt
|
||||
}
|
||||
latestFetchedChapter {
|
||||
id
|
||||
fetchedAt
|
||||
}
|
||||
latestUploadedChapter {
|
||||
id
|
||||
uploadDate
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const MANGA_READER_FIELDS = gql`
|
||||
${MANGA_BASE_FIELDS}
|
||||
|
||||
@@ -58,10 +85,12 @@ export const MANGA_READER_FIELDS = gql`
|
||||
export const MANGA_LIBRARY_FIELDS = gql`
|
||||
${MANGA_BASE_FIELDS}
|
||||
${MANGA_CHAPTER_STAT_FIELDS}
|
||||
${MANGA_CHAPTER_NODE_FIELDS}
|
||||
|
||||
fragment MANGA_LIBRARY_FIELDS on MangaType {
|
||||
...MANGA_BASE_FIELDS
|
||||
...MANGA_CHAPTER_STAT_FIELDS
|
||||
...MANGA_CHAPTER_NODE_FIELDS
|
||||
|
||||
genre
|
||||
lastFetchedAt
|
||||
@@ -75,29 +104,6 @@ export const MANGA_LIBRARY_FIELDS = gql`
|
||||
trackerId
|
||||
}
|
||||
}
|
||||
|
||||
firstUnreadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
}
|
||||
lastReadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
lastReadAt
|
||||
}
|
||||
latestReadChapter {
|
||||
id
|
||||
sourceOrder
|
||||
lastReadAt
|
||||
}
|
||||
latestFetchedChapter {
|
||||
id
|
||||
fetchedAt
|
||||
}
|
||||
latestUploadedChapter {
|
||||
id
|
||||
uploadDate
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user