From 7768ddeda4dacd57ae8c036da7642dcb86e1e52b Mon Sep 17 00:00:00 2001 From: Laurent Date: Sun, 20 Sep 2020 14:12:15 +0200 Subject: [PATCH] Fix crashes due to Realm not being up to date --- .../ui/modules/handhistory/replayer/ReplayExportService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayExportService.kt b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayExportService.kt index 7ceee45d..6ce1da39 100644 --- a/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayExportService.kt +++ b/app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayExportService.kt @@ -65,6 +65,8 @@ class ReplayExportService : Service() { val c = GlobalScope.async { val realm = Realm.getDefaultInstance() + realm.refresh() + val handHistory = realm.findById(handHistoryId) ?: throw PAIllegalStateException("HandHistory not found, id: $handHistoryId") val context = this@ReplayExportService