|
|
|
@ -10,7 +10,11 @@ import io.realm.Realm |
|
|
|
import kotlinx.android.synthetic.main.fragment_composable_table_report.* |
|
|
|
import kotlinx.android.synthetic.main.fragment_composable_table_report.* |
|
|
|
import kotlinx.coroutines.* |
|
|
|
import kotlinx.coroutines.* |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.calculus.* |
|
|
|
import net.pokeranalytics.android.calculus.Calculator |
|
|
|
|
|
|
|
import net.pokeranalytics.android.calculus.ComputableGroup |
|
|
|
|
|
|
|
import net.pokeranalytics.android.calculus.Report |
|
|
|
|
|
|
|
import net.pokeranalytics.android.calculus.Stat |
|
|
|
|
|
|
|
import net.pokeranalytics.android.exceptions.PAIllegalStateException |
|
|
|
import net.pokeranalytics.android.model.realm.ComputableResult |
|
|
|
import net.pokeranalytics.android.model.realm.ComputableResult |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportActivity |
|
|
|
import net.pokeranalytics.android.ui.adapter.DisplayDescriptor |
|
|
|
import net.pokeranalytics.android.ui.adapter.DisplayDescriptor |
|
|
|
@ -35,7 +39,7 @@ open class ComposableTableReportFragment : RealmFragment(), StaticRowRepresentab |
|
|
|
|
|
|
|
|
|
|
|
private var rowRepresentables: ArrayList<RowRepresentable> = ArrayList() |
|
|
|
private var rowRepresentables: ArrayList<RowRepresentable> = ArrayList() |
|
|
|
|
|
|
|
|
|
|
|
var statsAdapter: RowRepresentableAdapter? = null |
|
|
|
private var statsAdapter: RowRepresentableAdapter? = null |
|
|
|
var report: Report? = null |
|
|
|
var report: Report? = null |
|
|
|
|
|
|
|
|
|
|
|
companion object { |
|
|
|
companion object { |
|
|
|
@ -214,10 +218,9 @@ open class ComposableTableReportFragment : RealmFragment(), StaticRowRepresentab |
|
|
|
hideLoader() |
|
|
|
hideLoader() |
|
|
|
report?.let { |
|
|
|
report?.let { |
|
|
|
val title = stat.localizedTitle(requireContext()) |
|
|
|
val title = stat.localizedTitle(requireContext()) |
|
|
|
|
|
|
|
|
|
|
|
ReportActivity.newInstance(requireContext(), it, title, stat) |
|
|
|
ReportActivity.newInstance(requireContext(), it, title, stat) |
|
|
|
|
|
|
|
} ?: run { |
|
|
|
// ProgressReportActivity.newInstanceForResult(requireContext(), stat, it, title = title) |
|
|
|
throw PAIllegalStateException("Report should never be null here") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|