perftest
Laurent 3 years ago
parent 35ef3047b7
commit 323a3e3bbc
  1. 6
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/model/EditorViewModel.kt
  2. 2
      app/src/main/java/net/pokeranalytics/android/ui/modules/handhistory/replayer/ReplayExportService.kt

@ -637,9 +637,11 @@ class EditorViewModel : ViewModel(), RowRepresentableDataSource, CardCentralizer
val actions = this.sortedActions.map { it.action }
this.handHistory.actions.addAll(actions)
realm.executeTransactionAsync { execRealm ->
realm.executeTransactionAsync { asyncRealm ->
Timber.d("hh id = ${this.handHistory.id}")
this.handHistory.defineWinnerPositions()
execRealm.copyToRealmOrUpdate(this.handHistory)
val hh = asyncRealm.copyToRealmOrUpdate(this.handHistory)
Timber.d("hh2 id = ${hh.id}")
}
// this.defineWinnerPositions()
}

@ -297,6 +297,8 @@ class ReplayExportService : Service() {
CoroutineScope(Dispatchers.Default).launch {
val realm = Realm.getDefaultInstance()
realm.refresh()
val handHistory = realm.findById<HandHistory>(handHistoryId)
?: throw PAIllegalStateException("HandHistory not found, id: $handHistoryId")

Loading…
Cancel
Save