|
|
|
|
@ -18,6 +18,7 @@ import net.pokeranalytics.android.ui.adapter.RowRepresentableAdapter |
|
|
|
|
import net.pokeranalytics.android.ui.adapter.RowRepresentableDelegate |
|
|
|
|
import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.bottomsheet.BottomSheetFragment |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowViewType |
|
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.FilterCategoryRow |
|
|
|
|
@ -60,6 +61,15 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
|
override fun onRowSelected(position: Int, row: RowRepresentable, fromAction: Boolean) { |
|
|
|
|
super.onRowSelected(position, row, fromAction) |
|
|
|
|
|
|
|
|
|
Timber.d("Row: $row") |
|
|
|
|
|
|
|
|
|
when (row) { |
|
|
|
|
is FilterElementRow.ResultMoreThan -> { |
|
|
|
|
val data = row.editingDescriptors(mapOf("defaultValue" to "")) |
|
|
|
|
BottomSheetFragment.create(fragmentManager, row, this, data, null) |
|
|
|
|
} |
|
|
|
|
else -> { |
|
|
|
|
|
|
|
|
|
val oldRows = ArrayList<RowRepresentable>() |
|
|
|
|
oldRows.addAll(rows) |
|
|
|
|
if (selectedRows.contains(row)) { |
|
|
|
|
@ -78,6 +88,10 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
|
selectedRows.add(row) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
Timber.d("Row: $row") |
|
|
|
|
when (row) { |
|
|
|
|
@ -103,6 +117,7 @@ open class FilterDetailsFragment : PokerAnalyticsFragment(), StaticRowRepresenta |
|
|
|
|
|
|
|
|
|
override fun onRowValueChanged(value: Any?, row: RowRepresentable) { |
|
|
|
|
super.onRowValueChanged(value, row) |
|
|
|
|
Timber.d("onRowValueChanged: $row $value") |
|
|
|
|
selectedRows.add(row as FilterElementRow) |
|
|
|
|
rowRepresentableAdapter.refreshRow(row) |
|
|
|
|
} |
|
|
|
|
|