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

fix: app crashes when delete a track if the entry is already removed … #1380

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

cuong-tran
Copy link
Contributor

@cuong-tran cuong-tran commented Oct 26, 2024

…from tracker's service

with option to "Also remove from <Tracker>"

close #1023

…from tracker's service

with option to "Also remove from <Tracker>"
(tracker as DeletableTracker).delete(track)
try {
(tracker as DeletableTracker).delete(track)
} catch (e: Exception) {
Copy link
Member

Choose a reason for hiding this comment

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

this'll also fail on network errors

Copy link
Contributor Author

@cuong-tran cuong-tran Oct 26, 2024

Choose a reason for hiding this comment

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

I know, since the action is mainly removing track so just trying to catch any error on the side task of also removing entry from service.
Otherwise might need to implement:

  • Check for network, if no network, no internet, failed to connect then won't allow user to remove track.
  • If can connect to server then verify if the manga is exist then remove it from service, handle the return code to see if anything is wrong, maybe server got internal error which won't allow removing entry right now. With that we prevent user from remove the track.

And must implement that for all trackers. I would choose to prevent the app from crash first.

@AntsyLich AntsyLich merged commit 6de0641 into mihonapp:main Oct 26, 2024
1 check passed
@cuong-tran cuong-tran deleted the remove-track-crash branch October 26, 2024 14:20
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.

App Crashes When Deleting an Untracked Entry After Removing it from Tracker
2 participants