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() { 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