Fixes potential issue leaving ComputableResults alone

feature/top10
Laurent 7 years ago
parent 4b4cac69c4
commit 1801d62daf
  1. 6
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt

@ -559,17 +559,15 @@ open class Session : RealmObject(), Savable, Editable, StaticRowRepresentableDat
*/
fun cleanup() {
this.sessionSet?.let {
// Updates the timeline
this.sessionSet?.let {
SessionSetManager.removeFromTimeline(this)
}
// cleanup unnecessary related objects
this.result?.deleteFromRealm()
this.computableResults?.deleteAllFromRealm()
}
}
@Ignore
override val viewType: Int = RowViewType.ROW_SESSION.ordinal

Loading…
Cancel
Save