Skip to content

update all trackers progress when new tracker is added#1372

Closed
cuong-tran wants to merge 5 commits intomihonapp:mainfrom
cuong-tran:update-all-trackers
Closed

update all trackers progress when new tracker is added#1372
cuong-tran wants to merge 5 commits intomihonapp:mainfrom
cuong-tran:update-all-trackers

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

}

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
@cuong-tran
Copy link
Contributor Author

This is wrong. Closing.

@cuong-tran cuong-tran closed this Mar 25, 2025
@cuong-tran cuong-tran deleted the update-all-trackers branch March 25, 2025 19:21
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