mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-30 15:51:01 +00:00
feat: open stat in new window
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package ani.dantotsu.profile
|
||||
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.databinding.ItemChartBinding
|
||||
@@ -8,12 +9,19 @@ import com.xwray.groupie.viewbinding.BindableItem
|
||||
|
||||
class ChartItem(
|
||||
private val title: String,
|
||||
private val aaOptions: AAOptions): BindableItem<ItemChartBinding>() {
|
||||
private val aaOptions: AAOptions,
|
||||
private val activity: ProfileActivity): BindableItem<ItemChartBinding>() {
|
||||
private lateinit var binding: ItemChartBinding
|
||||
override fun bind(viewBinding: ItemChartBinding, position: Int) {
|
||||
binding = viewBinding
|
||||
binding.typeText.text = title
|
||||
binding.chartView.aa_drawChartWithChartOptions(aaOptions)
|
||||
binding.openButton.setOnClickListener {
|
||||
SingleStatActivity.chartOptions = aaOptions
|
||||
activity.startActivity(
|
||||
Intent(activity, SingleStatActivity::class.java)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayout(): Int {
|
||||
|
||||
Reference in New Issue
Block a user