|
|
|
|
@ -42,6 +42,8 @@ open class ComposableTableReportFragment : RealmFragment(), StaticRowRepresentab |
|
|
|
|
private var statsAdapter: RowRepresentableAdapter? = null |
|
|
|
|
var report: Report? = null |
|
|
|
|
|
|
|
|
|
private var hasComputationInProgress: Boolean = false |
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
@ -168,6 +170,11 @@ open class ComposableTableReportFragment : RealmFragment(), StaticRowRepresentab |
|
|
|
|
|
|
|
|
|
override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) { |
|
|
|
|
|
|
|
|
|
if (this.hasComputationInProgress) { |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.hasComputationInProgress = true |
|
|
|
|
|
|
|
|
|
val cr = getRealm().where(ComputableResult::class.java).findAll() |
|
|
|
|
if (cr.size < 2) { |
|
|
|
|
Toast.makeText(context, R.string.less_then_2_values_for_display, Toast.LENGTH_LONG).show() |
|
|
|
|
@ -223,6 +230,7 @@ open class ComposableTableReportFragment : RealmFragment(), StaticRowRepresentab |
|
|
|
|
throw PAIllegalStateException("Report should never be null here") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
hasComputationInProgress = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|