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

update all trackers progress when new tracker is added #1372

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cuong-tran
Copy link
Contributor

Whenever a new tracker is add, it will try to sync all trackers together with local reading progress

@cuong-tran cuong-tran marked this pull request as ready for review October 25, 2024 02:50
@AntsyLich
Copy link
Member

what's the reasoning?

@cuong-tran
Copy link
Contributor Author

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.

Copy link
Member

@AntsyLich AntsyLich left a 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>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to constructor

Comment on lines +82 to +83
.filter { it.first != null }
.forEach { (track, e) ->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.filter { it.first != null }
.forEach { (track, e) ->
.forEach { (track, e) ->
if (track == null) return@forEach

Comment on lines +88 to +94
context.toast(
context.stringResource(
MR.strings.track_error,
track!!.name,
e.message ?: "",
),
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
context.toast(
context.stringResource(
MR.strings.track_error,
track!!.name,
e.message ?: "",
),
)
context.toast(context.stringResource(MR.strings.track_error, track.name, e.message ?: ""))

@BrutuZ
Copy link
Contributor

BrutuZ commented Feb 23, 2025

Will it prompt the user? It should, there's the snackbar from "Update on manually mark as read" already, so could call that

@cuong-tran cuong-tran marked this pull request as draft February 25, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants