Fix app crash when removing tracked entry from tracker

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
This commit is contained in:
Secozzi 2024-10-31 12:05:58 +01:00
parent 38955686fd
commit e7714533b1
No known key found for this signature in database
GPG key ID: DD93E0B3A962AA86
2 changed files with 10 additions and 2 deletions

View file

@ -847,7 +847,11 @@ private data class TrackerAnimeRemoveScreen(
fun deleteAnimeFromService() {
screenModelScope.launchNonCancellable {
(tracker as DeletableAnimeTracker).delete(track)
try {
(tracker as DeletableAnimeTracker).delete(track)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Failed to delete anime entry from service" }
}
}
}

View file

@ -847,7 +847,11 @@ private data class TrackerMangaRemoveScreen(
fun deleteMangaFromService() {
screenModelScope.launchNonCancellable {
(tracker as DeletableMangaTracker).delete(track)
try {
(tracker as DeletableMangaTracker).delete(track)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e) { "Failed to delete manga entry from service" }
}
}
}