1
0
mirror of https://github.com/mihonapp/mihon.git synced 2025-04-02 02:25:39 +02:00

Fix crash on updating trackers after reading with no network (closes )

This commit is contained in:
arkon 2020-12-29 09:21:18 -05:00
parent 8135136c86
commit 3df98d576e

@ -673,14 +673,18 @@ class ReaderPresenter(
// We want these to execute even if the presenter is destroyed and leaks // We want these to execute even if the presenter is destroyed and leaks
// for a while. The view can still be garbage collected. // for a while. The view can still be garbage collected.
async { async {
runCatching {
service.update(track) service.update(track)
db.insertTrack(track).await() db.insertTrack(track).await()
} }
}
} else { } else {
null null
} }
} }
.awaitAll() .awaitAll()
.filter { it.isFailure }
.forEach { it.exceptionOrNull()?.let { e -> Timber.w(e) } }
} }
} }