Fixes potential issue leaving ComputableResults alone

dev
Laurent 7 years ago
parent 31822bb410
commit d62d6332f7
  1. 6
      app/src/main/java/net/pokeranalytics/android/model/realm/Session.kt

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

Loading…
Cancel
Save