-
Notifications
You must be signed in to change notification settings - Fork 567
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
update all trackers progress when new tracker is added #1372
base: main
Are you sure you want to change the base?
Conversation
a01b434
to
5ae9618
Compare
what's the reasoning? |
for example, if user has 2 trackers but with different progress, when user adds the 2nd tracker with a higher progress, this will sync all trackers to that higher progress instead of waiting for the next sync. Also, there is the TODO put right there state that. |
5ae9618
to
645f0ed
Compare
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.
Apply the suggestion to the rest of the changes and add changelog
@@ -73,7 +77,23 @@ class AddTracks( | |||
} | |||
} | |||
|
|||
syncChapterProgressWithTrack.await(mangaId, track, tracker) | |||
val context = Injekt.get<Application>() |
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.
Move to constructor
.filter { it.first != null } | ||
.forEach { (track, e) -> |
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.
.filter { it.first != null } | |
.forEach { (track, e) -> | |
.forEach { (track, e) -> | |
if (track == null) return@forEach |
context.toast( | ||
context.stringResource( | ||
MR.strings.track_error, | ||
track!!.name, | ||
e.message ?: "", | ||
), | ||
) |
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.
context.toast( | |
context.stringResource( | |
MR.strings.track_error, | |
track!!.name, | |
e.message ?: "", | |
), | |
) | |
context.toast(context.stringResource(MR.strings.track_error, track.name, e.message ?: "")) |
Will it prompt the user? It should, there's the snackbar from "Update on manually mark as read" already, so could call that |
Whenever a new tracker is add, it will try to sync all trackers together with local reading progress