Skip to content
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

manga.release shouldn't be persisted #27

Open
agilgur5 opened this issue Nov 29, 2019 · 0 comments
Open

manga.release shouldn't be persisted #27

agilgur5 opened this issue Nov 29, 2019 · 0 comments
Labels
bug Something isn't working external blocker This is blocked by an issue in an external dependency

Comments

@agilgur5
Copy link
Owner

agilgur5 commented Nov 29, 2019

Because "Today" or "Yesterday" is a relative date and becomes out-of-date very quickly. Not persisting it depends on agilgur5/mst-persist#16 .

That being said, we could add some logic to just not render it if the manga is a favorited manga for now, which fixes the most confusing part of the bug (having your manga say it was updated "Today" when it was actually released several days ago). manga.release was really only meant for latest manga, and I believe it's only persisted when it a favorite overlaps with a latest (as I think the updated date is only available on the latest page).

Sometimes manga.release is an actual date, and then it appears in gray, which is actually interesting (though could still be out of date). An interesting feature could be instead to display manga.chapters[0].date when there are no new unread chapters; I think that's better/more informative than just showing nothing. And thanks to #24 's auto-fetch chapters logic, it is always up-to-date (except when no internet connection) for favorited mangas. We could also update manga.release to just be a cached version of manga.chapters[0].date as well.
For latest manga, their chapters likely haven't been fetched yet, so they should still display "Today" / "Yesterday".

In theory, there's a different fix that actually isn't as difficult (but would likely still require a migration), which is just to change manga.release to types.maybe(types.date) and parse "Today" or "Yesterday" (if it's only those two, that is relatively easy)

@agilgur5 agilgur5 added bug Something isn't working external blocker This is blocked by an issue in an external dependency labels Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external blocker This is blocked by an issue in an external dependency
Projects
None yet
Development

No branches or pull requests

1 participant