-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/mark-chapters-as-read-based-on-tracker-history #708
base: master
Are you sure you want to change the base?
Feature/mark-chapters-as-read-based-on-tracker-history #708
Conversation
…unction to clean up the file
…read is higher than local
…ure/mark-chapters-as-read-based-on-tracker-history
… to run the dev server remotely
This PR implement feature request 699 |
…y when index is undefined instead of 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to add logic to support partial chapters. like 56.1
…cookies with request
…e checking if is behind of local read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an action in the options menu of an active track binding (TrackerActiveCard
)
it also should not fetch the chapter list and only sync the known chapters
} | ||
|
||
return allChapters.slice(index + 1); | ||
return getPreviousChapters(chapter.id, allChapters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the Chapters
class - same for all the added util functions
Since it check which tracker has the more chapter read, should the action be in the modal instead of the trackerCard? Like a button somewhere in the model (sync read)? For the chapters, you mean work with the current chapter that the manga has and not try to pull the latest? I might have done without knowing, but I did not know I was fetching the chapters. My intent was to only fetch the trackers history (trackerBind), and use the current chapters list to comprare (I use the requestManager because I though it return it from cache, kid of a cache store). |
@@ -28,8 +29,67 @@ export const TrackMangaButton = ({ manga }: { manga: TManga }) => { | |||
|
|||
const loggedInTrackers = Trackers.getLoggedIn(trackerList.data?.trackers.nodes ?? []); | |||
const trackersInUse = Trackers.getLoggedIn(Trackers.getTrackers(mangaTrackers)); | |||
const mangaChaptersQuery = requestManager.useGetMangaChapters(manga.id, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I this the line you are talking about that is fetching the chapters? @schroda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's this
// Fetch new chapters if behind tracker
if (localBehindTracker) {
await requestManager.getMangaChaptersFetch(manga.id, { awaitRefetchQueries: true }).response;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. If the local manga is behind (last chapter is 100 but last read in tracker is 103) there wont be a way to find the last chapter that match the tracker. In that case, do you propose to not get the last chapter and instead mark every chapter as read?. In the example, the last local chapter is 100 and the last read in tracker is 103, every chapter before 103 should be read; in this case all the local chapters should be marked as read?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I am
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I can do that.
This pull request includes the following changes:
Refactor: creates utility functions to work with lists
Refactor(chapters): removes commented out code and implements utility function to clean up the file
Refactor TrackMangaButton to update local source if the tracker last read is higher than local
Merge branch 'master' of github.com:Suwayomi/Suwayomi-WebUI into feature/mark-chapters-as-read-based-on-tracker-history
Refactor(packe.json): adds --host flag to the vite command to be able to run the dev server remotely