|
|
|
@ -3,13 +3,11 @@ package net.pokeranalytics.android.ui.activity |
|
|
|
import android.content.Context |
|
|
|
import android.content.Context |
|
|
|
import android.content.Intent |
|
|
|
import android.content.Intent |
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import androidx.fragment.app.Fragment |
|
|
|
|
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.R |
|
|
|
import net.pokeranalytics.android.calculus.Report |
|
|
|
import net.pokeranalytics.android.calculus.Report |
|
|
|
import net.pokeranalytics.android.calculus.Stat |
|
|
|
import net.pokeranalytics.android.calculus.Stat |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportActivity |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportParameters |
|
|
|
import net.pokeranalytics.android.ui.activity.components.ReportParameters |
|
|
|
import net.pokeranalytics.android.ui.activity.components.RequestCode |
|
|
|
|
|
|
|
import net.pokeranalytics.android.ui.fragment.report.ProgressReportFragment |
|
|
|
import net.pokeranalytics.android.ui.fragment.report.ProgressReportFragment |
|
|
|
import net.pokeranalytics.android.ui.viewmodel.ReportViewModel |
|
|
|
import net.pokeranalytics.android.ui.viewmodel.ReportViewModel |
|
|
|
|
|
|
|
|
|
|
|
@ -28,12 +26,12 @@ class ProgressReportActivity : ReportActivity() { |
|
|
|
context.startActivity(intent) |
|
|
|
context.startActivity(intent) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun newInstanceForResult(fragment: Fragment, report: Report, title: String, stat: Stat? = null, displayAggregationChoices: Boolean = true) { |
|
|
|
// fun newInstanceForResult(fragment: Fragment, report: Report, title: String, stat: Stat? = null, displayAggregationChoices: Boolean = true) { |
|
|
|
val parameters = ReportParameters(report, title, stat, showAggregationChoices = displayAggregationChoices) |
|
|
|
// val parameters = ReportParameters(report, title, stat, showAggregationChoices = displayAggregationChoices) |
|
|
|
ReportViewModel.defineParameters(parameters) |
|
|
|
// ReportViewModel.defineParameters(parameters) |
|
|
|
val intent = Intent(fragment.context, ProgressReportActivity::class.java) |
|
|
|
// val intent = Intent(fragment.context, ProgressReportActivity::class.java) |
|
|
|
fragment.startActivityForResult(intent, RequestCode.DEFAULT.value) |
|
|
|
// fragment.startActivityForResult(intent, RequestCode.DEFAULT.value) |
|
|
|
} |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|