|
|
|
|
@ -27,6 +27,7 @@ import net.pokeranalytics.android.ui.view.RowViewType |
|
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.CustomizableRowRepresentable |
|
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.SeparatorRow |
|
|
|
|
import net.pokeranalytics.android.util.extensions.sorted |
|
|
|
|
import timber.log.Timber |
|
|
|
|
|
|
|
|
|
class ReportCreationFragment : RealmFragment(), RowRepresentableDataSource, RowRepresentableDelegate { |
|
|
|
|
|
|
|
|
|
@ -171,7 +172,13 @@ class ReportCreationFragment : RealmFragment(), RowRepresentableDataSource, RowR |
|
|
|
|
override fun viewTypeForPosition(position: Int): Int { |
|
|
|
|
return when (position) { |
|
|
|
|
0 -> RowViewType.HEADER_TITLE.ordinal |
|
|
|
|
else -> RowViewType.TITLE_CHECK.ordinal |
|
|
|
|
else -> { |
|
|
|
|
val row = this.currentRows[position] |
|
|
|
|
when (row) { |
|
|
|
|
is SeparatorRow -> row.viewType |
|
|
|
|
else -> RowViewType.TITLE_CHECK.ordinal |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -257,7 +264,8 @@ class Assistant { |
|
|
|
|
} |
|
|
|
|
is Criteria -> item |
|
|
|
|
else -> { |
|
|
|
|
throw IllegalStateException("Unmanaged data type: $item") |
|
|
|
|
Timber.d("onRowSelected: unmanaged data type: $item") |
|
|
|
|
return false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|